Skip to content

feat(examples): Use hosted MySQL databases for tests #4530

feat(examples): Use hosted MySQL databases for tests

feat(examples): Use hosted MySQL databases for tests #4530

Workflow file for this run

name: go
on:
push:
branches:
- main
pull_request:
jobs:
windows-build:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- run: go build ./...
darwin-build:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- run: go build ./...
build:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: install sqlc-gen-test
run: go install github.com/sqlc-dev/sqlc-gen-test@v0.1.0
- name: install ./...
run: go install ./...
- name: build internal/endtoend
run: go build ./...
working-directory: internal/endtoend/testdata
- name: test ./...
run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./...
env:
CI_SQLC_PROJECT_ID: ${{ secrets.CI_SQLC_PROJECT_ID }}
CI_SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
vuln_check:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- run: go install golang.org/x/vuln/cmd/govulncheck@latest
- run: govulncheck ./...