From 211657b042e4d4109b52ff663d1945a5e058cc80 Mon Sep 17 00:00:00 2001 From: Gauvain Date: Sun, 5 Jul 2026 03:22:49 +0200 Subject: [PATCH] ci(lint): stop re-running heavy jobs on PR title edits The quality gate ran its full matrix on every PR edit event even though title/body edits cannot change the code: only validate_pr_title needs them. Gate the heavy jobs on action != 'edited', add the missing concurrency group (Renovate PRs currently run the whole gate twice per commit), cache Bun dependencies like the other workflows, drop the unused setup-node step, and run checkout/Bun setup in parallel. --- .github/workflows/linting.yml | 72 +++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 25 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index f8799f26..cc753b8e 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,6 +11,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: validate_pr_title: name: "📝 Validate PR Title" @@ -46,6 +50,8 @@ jobs: dependency-review: name: 🔍 Vulnerable Dependencies + # PR title/body edits can't change the dependency graph — only re-run on code events. + if: github.event.action != 'edited' runs-on: ubuntu-26.04 permissions: contents: read @@ -65,20 +71,31 @@ jobs: expo-doctor: name: 🚑 Expo Doctor Check + # PR title/body edits can't change the project — only re-run on code events. + if: github.event.action != 'edited' runs-on: ubuntu-26.04 steps: - - name: 🛒 Checkout repository - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - submodules: recursive - fetch-depth: 0 + - parallel: + - name: 🛒 Checkout repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + submodules: recursive + fetch-depth: 0 - - name: 🍞 Setup Bun - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + - name: 🍞 Setup Bun + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + with: + # renovate: datasource=npm depName=bun + bun-version: "1.3.14" + + - name: 💾 Cache Bun dependencies + uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0 with: - # renovate: datasource=npm depName=bun - bun-version: "1.3.14" + path: ~/.bun/install/cache + key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }} + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-bun- - name: 📦 Install dependencies (bun) run: bun install --frozen-lockfile @@ -91,6 +108,8 @@ jobs: code_quality: name: "🔍 Lint & Test (${{ matrix.command }})" + # PR title/body edits can't change the code — only re-run on code events. + if: github.event.action != 'edited' runs-on: ubuntu-26.04 strategy: fail-fast: false @@ -103,24 +122,27 @@ jobs: - "i18n:check" steps: - - name: "📥 Checkout PR code" - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - submodules: recursive - fetch-depth: 0 + - parallel: + - name: "📥 Checkout PR code" + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + submodules: recursive + fetch-depth: 0 - - name: "🟢 Setup Node.js" - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - # renovate: datasource=node-version depName=node versioning=node - node-version: "24.18.0" + - name: "🍞 Setup Bun" + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + with: + # renovate: datasource=npm depName=bun + bun-version: "1.3.14" - - name: "🍞 Setup Bun" - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + - name: 💾 Cache Bun dependencies + uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0 with: - # renovate: datasource=npm depName=bun - bun-version: "1.3.14" + path: ~/.bun/install/cache + key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }} + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-bun- - name: "📦 Install dependencies" run: bun install --frozen-lockfile