Skip to content

ci: add check for swagger changes #407

ci: add check for swagger changes

ci: add check for swagger changes #407

Workflow file for this run

name: Go unit tests
on: [push, workflow_dispatch]
permissions:
checks: write
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check for Swagger changes
run: |
go install github.com/swaggo/swag/cmd/swag@latest
swag init
swag fmt
git diff --quiet docs || (echo "Swagger is not up to date" ; exit 1)
- name: Run GolangCI-Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.3
- name: Test application
run: go test -short -v ./...