42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
cache-dependency-path: tools/requirements-validation.txt
|
|
- name: Install specification validators
|
|
run: python -m pip install --requirement tools/requirements-validation.txt
|
|
- name: Check formatting
|
|
run: test -z "$(gofmt -l .)"
|
|
- name: Test
|
|
run: go test ./...
|
|
- name: Build without cgo
|
|
run: CGO_ENABLED=0 go build ./...
|
|
- name: Race detection
|
|
run: go test -race ./...
|
|
- name: Vet
|
|
run: go vet ./...
|
|
- name: Staticcheck
|
|
run: go run honnef.co/go/tools/cmd/staticcheck@v0.6.1 ./...
|
|
- uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
version: v2.4.0
|
|
- name: Validate specifications and Compose contract
|
|
run: python tools/validate_spec.py
|