ci: restructure Go gate into separate jobs, add knip and svelte strict check
CI / Frontend deps check (push) Successful in 30s
CI / Go build (push) Successful in 34s
CI / Go vulnerabilities (push) Successful in 34s
CI / go mod tidy (push) Failing after 16s
CI / Frontend build (push) Successful in 1m22s
CI / Knip (push) Failing after 48s
CI / Go vet (push) Successful in 1m0s
CI / golangci-lint (push) Failing after 1m13s
CI / Tests (prod) (push) Has been skipped
CI / Tests (dev) (push) Has been skipped
CI / Race (prod) (push) Has been skipped
CI / Race (dev) (push) Has been skipped
CI / Svelte strict check (push) Successful in 40s
CI / Frontend QC (audit) (push) Has been skipped
CI / Frontend QC (typecheck) (push) Has been skipped
CI / Frontend QC (lint) (push) Has been skipped
CI / Frontend deps check (push) Successful in 30s
CI / Go build (push) Successful in 34s
CI / Go vulnerabilities (push) Successful in 34s
CI / go mod tidy (push) Failing after 16s
CI / Frontend build (push) Successful in 1m22s
CI / Knip (push) Failing after 48s
CI / Go vet (push) Successful in 1m0s
CI / golangci-lint (push) Failing after 1m13s
CI / Tests (prod) (push) Has been skipped
CI / Tests (dev) (push) Has been skipped
CI / Race (prod) (push) Has been skipped
CI / Race (dev) (push) Has been skipped
CI / Svelte strict check (push) Successful in 40s
CI / Frontend QC (audit) (push) Has been skipped
CI / Frontend QC (typecheck) (push) Has been skipped
CI / Frontend QC (lint) (push) Has been skipped
Go: go-build gates three parallel jobs (go-vet, golangci-lint, go-mod-tidy) which gate test+race. Frontend: add knip (between deps and QC) and svelte-check --fail-on-warnings (after build). QC now gates on build, knip, and svelte strict. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
+164
-9
@@ -17,8 +17,42 @@ env:
|
||||
POSTGRES_DB: mydb
|
||||
|
||||
jobs:
|
||||
vet:
|
||||
name: Go gate
|
||||
go-build:
|
||||
name: Go build
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.26"
|
||||
cache: false
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }}-build
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Fix node toolcache path for Post-step cleanup
|
||||
run: |
|
||||
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
||||
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
||||
|
||||
- name: Build
|
||||
run: go build ./...
|
||||
working-directory: backend
|
||||
|
||||
go-vet:
|
||||
name: Go vet
|
||||
needs: [go-build]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -46,10 +80,6 @@ jobs:
|
||||
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
||||
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
||||
|
||||
- name: Build
|
||||
run: go build ./...
|
||||
working-directory: backend
|
||||
|
||||
- name: Vet (dev tags)
|
||||
run: go vet -tags "test,dev" ./...
|
||||
working-directory: backend
|
||||
@@ -58,12 +88,72 @@ jobs:
|
||||
run: go vet -tags "test,!dev" ./...
|
||||
working-directory: backend
|
||||
|
||||
go-lint:
|
||||
name: golangci-lint
|
||||
needs: [go-build]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.26"
|
||||
cache: false
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }}-lint
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Fix node toolcache path for Post-step cleanup
|
||||
run: |
|
||||
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
||||
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
||||
|
||||
- name: golangci-lint
|
||||
run: |
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
golangci-lint run ./...
|
||||
working-directory: backend
|
||||
|
||||
go-mod-tidy:
|
||||
name: go mod tidy
|
||||
needs: [go-build]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.26"
|
||||
cache: false
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }}-tidy
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Fix node toolcache path for Post-step cleanup
|
||||
run: |
|
||||
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
||||
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
||||
|
||||
- name: go mod tidy check
|
||||
run: |
|
||||
cp go.sum go.sum.bak
|
||||
@@ -75,7 +165,7 @@ jobs:
|
||||
|
||||
test:
|
||||
name: Tests (${{ matrix.label }})
|
||||
needs: [vet, vulns]
|
||||
needs: [go-vet, go-lint, go-mod-tidy, vulns]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -147,7 +237,7 @@ jobs:
|
||||
|
||||
race:
|
||||
name: Race (${{ matrix.label }})
|
||||
needs: [vet, vulns]
|
||||
needs: [go-vet, go-lint, go-mod-tidy, vulns]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -340,6 +430,37 @@ jobs:
|
||||
console.log('All overrides appear necessary');
|
||||
"
|
||||
|
||||
knip:
|
||||
name: Knip
|
||||
needs: [frontend-deps]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Fix node toolcache path for Post-step cleanup
|
||||
run: |
|
||||
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
||||
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
||||
|
||||
- name: Restore npm dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.npm
|
||||
frontend/node_modules
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('frontend/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-npm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd frontend && npm ci
|
||||
|
||||
- name: Run knip
|
||||
run: cd frontend && npx knip
|
||||
|
||||
frontend-build:
|
||||
name: Frontend build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -370,9 +491,43 @@ jobs:
|
||||
- name: Build
|
||||
run: cd frontend && npm run build
|
||||
|
||||
frontend-svelte-strict:
|
||||
name: Svelte strict check
|
||||
needs: [frontend-build]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Fix node toolcache path for Post-step cleanup
|
||||
run: |
|
||||
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
||||
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
||||
|
||||
- name: Restore npm dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.npm
|
||||
frontend/node_modules
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('frontend/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-npm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd frontend && npm ci
|
||||
|
||||
- name: svelte-kit sync
|
||||
run: cd frontend && npx svelte-kit sync
|
||||
|
||||
- name: svelte-check (fail on warnings)
|
||||
run: cd frontend && npx svelte-check --tsconfig ./tsconfig.json --fail-on-warnings
|
||||
|
||||
frontend-qc:
|
||||
name: Frontend QC (${{ matrix.task }})
|
||||
needs: [frontend-deps, frontend-build]
|
||||
needs: [frontend-build, knip, frontend-svelte-strict]
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
|
||||
Reference in New Issue
Block a user