cfcf9dbeec
CI / test (push) Failing after 12m36s
- .github/workflows/ci.yml: go-version '1.23' -> '1.25' to match go.mod - All go build/vet/test/lint: use ./cmd/... ./internal/... instead of ./... to avoid picking up Go packages in node_modules/ (flatted) - Makefile: same fix for test target
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25'
|
|
cache: true
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: web/frontend/package-lock.json
|
|
|
|
- name: Install frontend deps
|
|
run: cd web/frontend && npm ci
|
|
|
|
- name: Build frontend
|
|
run: cd web/frontend && npm run build
|
|
|
|
- name: Download Go deps
|
|
run: go mod download
|
|
|
|
- name: Build
|
|
run: go build ./cmd/... ./internal/...
|
|
|
|
- name: Vet
|
|
run: go vet ./cmd/... ./internal/...
|
|
|
|
- name: Test
|
|
run: go test -race -coverprofile=coverage.out ./cmd/... ./internal/...
|
|
|
|
- name: Lint
|
|
run: |
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
|
|
$(go env GOPATH)/bin/golangci-lint run ./cmd/... ./internal/...
|
|
|
|
- name: Upload coverage
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage
|
|
path: coverage.out
|