From 93883602d9a2494ce29facfa027bc562a5602ffc Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Thu, 9 Jul 2026 17:52:53 +0100 Subject: [PATCH] ci: extract frontend deps checks into separate gating job frontend-deps runs npm outdated + stale override checks as its own job. frontend-build waits for frontend-deps before starting, so stale deps stop the pipeline before build resources are consumed. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .gitea/workflows/ci.yaml | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index d285eb5..4ff9572 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -236,8 +236,8 @@ jobs: go install golang.org/x/vuln/cmd/govulncheck@latest govulncheck ./... - frontend-build: - name: Frontend build (gate) + frontend-deps: + name: Frontend deps check runs-on: ubuntu-latest defaults: run: @@ -325,6 +325,34 @@ jobs: console.log('All overrides appear necessary'); " + frontend-build: + name: Frontend build (gate) + 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: Cache 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: Build run: cd frontend && npm run build