mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-25 23:03:41 +01:00
* Improve swagger generation These issues are causing ogen-api to fail after I used the swagger converter. * Specify multipart/form-data routes Operations with parameters of "type: file" must include "multipart/form-data" in their "consumes" property * Fix example usage * fixup! Specify multipart/form-data routes * Fix final validation errors
42 lines
1002 B
YAML
42 lines
1002 B
YAML
name: Go Build/Test
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
Go:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.21"
|
|
|
|
- name: Install Task
|
|
uses: arduino/setup-task@v1
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v4
|
|
with:
|
|
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
|
version: latest
|
|
|
|
# Optional: working directory, useful for monorepos
|
|
working-directory: backend
|
|
args: --timeout=6m
|
|
|
|
- name: Build API
|
|
run: task go:build
|
|
|
|
- name: Test
|
|
run: task go:coverage
|
|
|
|
- name: Validate OpenAPI definition
|
|
uses: swaggerexpert/swagger-editor-validate@v1
|
|
with:
|
|
definition-file: backend/app/api/static/docs/swagger.json
|