Bump github/codeql-action from 2.3.0 to 2.21.5 #292
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PostgreSQL tests | |
on: [ push ] | |
permissions: # added using https://github.com/step-security/secure-workflows | |
contents: read | |
jobs: | |
Test-postgres-integration: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 | |
with: | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
codecov.io:443 | |
github.com:443 | |
go.dev:443 | |
golang.org:443 | |
proxy.golang.org:443 | |
storage.googleapis.com:443 | |
uploader.codecov.io:443 | |
- name: Check out repository code | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- name: Set up Go | |
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 | |
with: | |
go-version: 1.16 | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
env: | |
LIBSCHEMA_POSTGRES_TEST_DSN: "postgres://postgres:postgres@localhost?sslmode=disable" | |
run: go test ./lspostgres/... -v | |
- name: Run Coverage | |
env: | |
LIBSCHEMA_POSTGRES_TEST_DSN: "postgres://postgres:postgres@localhost?sslmode=disable" | |
run: go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/muir/libschema/... ./lspostgres/... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 | |
with: | |
verbose: true | |
flags: pg_tests | |
fail_ci_if_error: true |