Tests: Add test to validate swagger.json

This commit is contained in:
Ralph Slooten
2023-10-15 20:55:43 +13:00
parent cded4d25fc
commit e564637203

View File

@@ -16,7 +16,8 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v4
- uses: actions/cache@v3
- name: Run Go tests
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
@@ -28,9 +29,16 @@ jobs:
- run: go test ./internal/storage -bench=.
# build the assets
- uses: actions/setup-node@v3
- name: Build web UI
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- run: npm run package
# validate the swagger file
- name: Validate OpenAPI definition
uses: char0n/swagger-editor-validate@v1
with:
definition-file: server/ui/api/v1/swagger.json