mirror of
https://github.com/zen-browser/www
synced 2026-04-25 17:14:56 +02:00
refactor(ci-pipeline): streamline CI steps by reorganizing dependency installation and restoring cache
- Moved Playwright browser installation and project build steps to the appropriate locations in the CI pipeline. - Removed redundant cache paths for Playwright, optimizing the workflow.
This commit is contained in:
34
.github/workflows/ci-pipeline.yml
vendored
34
.github/workflows/ci-pipeline.yml
vendored
@@ -17,34 +17,11 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
build-check:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- name: Restore node_modules from cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
||||
- name: Verify npm installation
|
||||
run: npm --version
|
||||
- name: Build project
|
||||
run: npm run build
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
biome:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -61,7 +38,6 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
||||
- name: Run Biome check
|
||||
run: npx biome check ./src
|
||||
@@ -79,7 +55,6 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
||||
- name: Run Vitest tests
|
||||
run: npx vitest run
|
||||
@@ -97,8 +72,11 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
- name: Build project
|
||||
run: npm run build
|
||||
- name: Run Playwright tests
|
||||
run: npx playwright test
|
||||
- uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user