mirror of
https://github.com/karust/openserp.git
synced 2026-08-05 16:53:54 +08:00
45 lines
812 B
YAML
45 lines
812 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, tests]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-build-lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.24"
|
|
cache: true
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Run unit tests
|
|
run: go test -race -count=1 ./...
|
|
|
|
- name: Run go vet
|
|
run: go vet ./...
|
|
|
|
- name: Lint OpenAPI spec
|
|
run: npx --yes @redocly/cli lint docs/openapi.yaml
|
|
|
|
- name: Build
|
|
run: go build .
|
|
|
|
- name: Run golangci-lint
|
|
uses: golangci/golangci-lint-action@v6
|