Release 0.3 #57
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: 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@v6 | |
with: | |
version: latest | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
- name: Run tests | |
run: go test -v ./... | |
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 | |
dbmate: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: pbx | |
POSTGRES_DB: asterisk | |
POSTGRES_PASSWORD: pbx | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
DATABASE_URL: postgres://pbx:[email protected]:5432/asterisk?sslmode=disable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dbmate | |
run: npm install dbmate | |
- name: Run migrations | |
run: npx dbmate up | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false |