ci: verify swagger.yaml is up to date #34
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: qa | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: golangci/golangci-lint-action@v5 | |
with: | |
version: latest | |
swagger: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Install swag | |
run: go install github.com/swaggo/swag/cmd/swag@latest | |
- name: Generate swagger.yaml | |
run: make docs | |
- name: Verify swagger.yaml is up to date | |
run: git diff --exit-code docs/swagger.yaml | |
sqlc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: sqlc-dev/setup-sqlc@v4 | |
with: | |
sqlc-version: '1.26.0' | |
- name: Vet | |
run: sqlc vet | |
- name: Diff | |
run: sqlc diff | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false |