Skip to content

Commit

Permalink
ci(github-actions): improve cache fallback
Browse files Browse the repository at this point in the history
Ensure fallback keys are robust, aiding in partial key matches if the exact key is not found
  • Loading branch information
PunGrumpy committed May 22, 2024
1 parent d110e09 commit 4148c28
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
name: 🤹‍♂️ Continuous Integration

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

env:
SCOPE_OWNER: '@pungrumpy'

jobs:
security:
name: 🔒 Security
uses: ./.github/workflows/security.yml

codeql:
needs: [security]
name: 🫸 CodeQL
uses: ./.github/workflows/codeql.yml

lint:
needs: [codeql]
strategy:
Expand Down Expand Up @@ -43,10 +48,13 @@ jobs:
key: ${{ runner.os }}-bun-${{ matrix.node-version }}-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-${{ matrix.node-version }}-
${{ runner.os }}-bun-
${{ runner.os }}-
- name: 🔽 Install Dependencies
run: bun install
- name: ⚖️ Lint
run: bun lint

test:
needs: [lint]
strategy:
Expand Down Expand Up @@ -75,10 +83,13 @@ jobs:
key: ${{ runner.os }}-bun-${{ matrix.node-version }}-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-${{ matrix.node-version }}-
${{ runner.os }}-bun-
${{ runner.os }}-
- name: 🔽 Install Dependencies
run: bun install
- name: 🧪 Test
run: bun run test:ci

release:
strategy:
fail-fast: false
Expand Down Expand Up @@ -117,6 +128,8 @@ jobs:
key: ${{ runner.os }}-bun-${{ matrix.node-version }}-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-${{ matrix.node-version }}-
${{ runner.os }}-bun-
${{ runner.os }}-
- name: 🔽 Install Dependencies
run: bun install
- name: 🏷️ Tag stable versions
Expand Down

0 comments on commit 4148c28

Please sign in to comment.