github.com/acoshift/pgsql@v0.15.3/.github/workflows/test.yaml (about)

     1  name: Test
     2  on:
     3    push:
     4    pull_request:
     5  jobs:
     6    runner-job:
     7      runs-on: ubuntu-latest
     8      services:
     9        postgres:
    10          image: postgres
    11          env:
    12            POSTGRES_PASSWORD: postgres
    13          options: >-
    14            --health-cmd pg_isready
    15            --health-interval 10s
    16            --health-timeout 5s
    17            --health-retries 5
    18          ports:
    19          - 5432:5432
    20      strategy:
    21        matrix:
    22          go: ['1.20', '1.21']
    23      name: Go ${{ matrix.go }}
    24      steps:
    25      - uses: actions/checkout@v3
    26      - uses: actions/setup-go@v4
    27        with:
    28          go-version: ${{ matrix.go }}
    29      - run: go get -t -v ./...
    30      - run: go test -coverprofile=coverage.txt -covermode=atomic ./...
    31        env:
    32          DB_URL: postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable
    33      - uses: codecov/codecov-action@v3