Giter Club home page Giter Club logo

Comments (4)

mrtrkmn avatar mrtrkmn commented on September 20, 2024 4

Hi @arthurkushman

It might be too late that I am trying to respond to you, but it may help for others who might looking for a solution for that problem. I could not understand the purpose of using node. I hope, following workflow might help to anyone.

Why do not you prefer to use this one instead ?

name: Build and run
on: [push]

jobs:
  build:
    runs-on:  ubuntu-latest

    services:
      postgres:
        image: postgres:latest 
        env:
          POSTGRES_PASSWORD: dummy-password
          POSTGRES_USER: postgres
          POSTGRES_DB: dummydb
            # Set health checks to wait until postgres has started
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          # Maps tcp port 5432 on service container to the host
          - 5432:5432

    steps:
      - name: Set up Go 1.14
        uses: actions/setup-go@v1
        with:
          go-version: 1.14
        id: go
      - name: Check out code into the Go module directory
        uses: actions/checkout@v1
      - name: Get dependencies
        run: |
          go get -v -t -d ./...
          if [ -f Gopkg.toml ]; then
             curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
             dep ensure
          fi

     - name: Build
       run: go build -v .
      
     - name: Test with cover profile
       run: go test -coverprofile=coverage.out -v --race ./...

    - name: Push coverage to codecov
      run: bash <(curl -s https://codecov.io/bash) -t 489df204-a660-49b8-8ddb-6637ae4c4216

from example-services.

mrtrkmn avatar mrtrkmn commented on September 20, 2024 3

@arthurkushman I have created a small pull request, I hope, it will help you to overcome the error. When it does, would be nice to close this issue :)

from example-services.

arthurkushman avatar arthurkushman commented on September 20, 2024 3

@mrturkmen06 - perfect, u killed 2 rabbits by one shot - resolved this issue and contributed to my project, thx a lot

from example-services.

arthurkushman avatar arthurkushman commented on September 20, 2024

@mrturkmen06 tried as u proposed, but job is failing:
https://github.com/arthurkushman/buildsqlx/runs/703745737?check_suite_focus=true

Run go test -coverprofile=coverage.out -v --race ./...
panic: dial tcp: lookup postgres on 168.63.129.16:53: no such host

goroutine 1 [running]:
github.com/arthurkushman/buildsqlx.TestMain(0xc00010c080)
	/home/runner/work/buildsqlx/buildsqlx/builder_test.go:24 +0x401
main.main()
	_testmain.go:198 +0x334
FAIL	github.com/arthurkushman/buildsqlx	0.057s
FAIL
##[error]Process completed with exit code 1.

FYI: connection string

var db = NewDb(NewConnection("postgres", "host=postgres user=postgres dbname=postgres password=postgres sslmode=disable"))

from example-services.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.