mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +02:00
refactor(ci): use matrix for simplified jobs
This commit is contained in:
parent
e3ab9237bd
commit
2eb1629ab3
1 changed files with 6 additions and 15 deletions
21
.github/workflows/ci-pipeline.yml
vendored
21
.github/workflows/ci-pipeline.yml
vendored
|
@ -36,18 +36,9 @@ jobs:
|
||||||
needs: check_changes
|
needs: check_changes
|
||||||
if: ${{ needs.check_changes.outputs.exists == 'true' }}
|
if: ${{ needs.check_changes.outputs.exists == 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
turbo-cache-key: ${{ steps.cache-keys.outputs.turbo-cache-key }}
|
|
||||||
node-modules-cache-key: ${{ steps.cache-keys.outputs.node-modules-cache-key }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Generate cache keys
|
|
||||||
id: cache-keys
|
|
||||||
run: |
|
|
||||||
echo "turbo-cache-key=${{ runner.os }}-turbo-${{ github.sha }}" >> $GITHUB_OUTPUT
|
|
||||||
echo "node-modules-cache-key=${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Check if node_modules cache exists
|
- name: Check if node_modules cache exists
|
||||||
id: check-node-modules-cache
|
id: check-node-modules-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
@ -55,7 +46,7 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
node_modules
|
node_modules
|
||||||
*/node_modules
|
*/node_modules
|
||||||
key: ${{ needs.setup.outputs.node-modules-cache-key }}
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
lookup-only: true
|
lookup-only: true
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
|
@ -81,7 +72,7 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
node_modules
|
node_modules
|
||||||
*/node_modules
|
*/node_modules
|
||||||
key: ${{ needs.setup.outputs.node-modules-cache-key }}
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
|
||||||
quality_checks:
|
quality_checks:
|
||||||
name: ${{ matrix.check }}
|
name: ${{ matrix.check }}
|
||||||
|
@ -98,7 +89,7 @@ jobs:
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .turbo
|
path: .turbo
|
||||||
key: ${{ needs.setup.outputs.turbo-cache-key }}
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-turbo-
|
${{ runner.os }}-turbo-
|
||||||
|
|
||||||
|
@ -108,7 +99,7 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
node_modules
|
node_modules
|
||||||
*/node_modules
|
*/node_modules
|
||||||
key: ${{ needs.setup.outputs.node-modules-cache-key }}
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-modules-
|
${{ runner.os }}-node-modules-
|
||||||
|
|
||||||
|
@ -157,7 +148,7 @@ jobs:
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .turbo
|
path: .turbo
|
||||||
key: ${{ needs.setup.outputs.turbo-cache-key }}
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-turbo-
|
${{ runner.os }}-turbo-
|
||||||
|
|
||||||
|
@ -167,7 +158,7 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
node_modules
|
node_modules
|
||||||
*/node_modules
|
*/node_modules
|
||||||
key: ${{ needs.setup.outputs.node-modules-cache-key }}
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-modules-
|
${{ runner.os }}-node-modules-
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue