From 1921445a73a1849e3172dbbef9844563c2e14937 Mon Sep 17 00:00:00 2001 From: "mendral-app[bot]" <233154221+mendral-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 05:32:17 -0700 Subject: [PATCH] ci: add shared build job to eliminate redundant make build in test and lint Extract make build into a dedicated build job that uploads artifacts (bin/probod, frontend dist, emails dist). Both test and lint jobs now download these artifacts instead of rebuilding from scratch. This eliminates ~172 compute minutes/week of redundant builds while keeping wall-clock time neutral (test and lint were spending their first ~2min building anyway). --- .github/workflows/make.yaml | 46 +++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/.github/workflows/make.yaml b/.github/workflows/make.yaml index e1c05f157..44a7f319d 100644 --- a/.github/workflows/make.yaml +++ b/.github/workflows/make.yaml @@ -89,8 +89,39 @@ jobs: severity-cutoff: critical output-format: table + build: + name: "build" + runs-on: "ubuntu-22.04" + permissions: + contents: "read" + steps: + - uses: "actions/checkout@v6" + with: + submodules: recursive + - uses: "actions/setup-go@v6" + with: + go-version: "1.26.1" + cache: true + - uses: "actions/setup-node@v6" + with: + node-version-file: ".nvmrc" + cache: "npm" + - run: "npm i -g npm@11.8.0" + - run: "npm ci" + - run: "make build" + - uses: "actions/upload-artifact@v6" + with: + name: "build-artifacts" + path: | + bin/probod + apps/console/dist/ + apps/trust/dist/ + packages/emails/dist/ + retention-days: 1 + lint: name: "lint" + needs: [build] runs-on: "ubuntu-22.04" permissions: contents: "read" @@ -111,11 +142,15 @@ jobs: install-only: true - run: "npm i -g npm@11.8.0" - run: "npm ci" - - run: "make build" + - uses: "actions/download-artifact@v6" + with: + name: "build-artifacts" + - run: "chmod +x bin/probod" - run: "make lint" test: name: "test" + needs: [build] runs-on: "ubuntu-22.04" permissions: contents: "read" @@ -127,13 +162,10 @@ jobs: with: go-version: "1.26.1" cache: true - - uses: "actions/setup-node@v6" + - uses: "actions/download-artifact@v6" with: - node-version-file: ".nvmrc" - cache: "npm" - - run: "npm i -g npm@11.8.0" - - run: "npm ci" - - run: "make build" + name: "build-artifacts" + - run: "chmod +x bin/probod" - run: "make test" env: GOTESTSUM_JUNITFILE: "junit.xml"