Skip to content

Commit 208bf94

Browse files
committed
fix(ci): Install playwright browser before launching tests
1 parent 7b56494 commit 208bf94

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/code-quality.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,47 @@ jobs:
6161
name: 🔬 Tests
6262
timeout-minutes: 10
6363
runs-on: ubuntu-latest
64+
env:
65+
VITE_BASE_URL: http://localhost:3000
6466
strategy:
6567
matrix:
6668
node: [20, 22, 24, 'lts/*']
6769
steps:
6870
- uses: actions/checkout@v3
6971

7072
- name: Install pnpm
71-
uses: pnpm/action-setup@v2
73+
uses: pnpm/action-setup@v4
7274
with:
7375
version: 10
7476

77+
- name: Get pnpm store directory
78+
shell: bash
79+
run: |
80+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
81+
7582
- name: Setup Node.js
7683
uses: actions/setup-node@v4
7784
with:
7885
node-version: ${{ matrix.node }}
7986
cache: 'pnpm'
8087

88+
- name: Cache node modules
89+
uses: actions/cache@v4
90+
env:
91+
cache-name: cache-node-modules
92+
with:
93+
path: ${{ env.STORE_PATH }}
94+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
95+
restore-keys: |
96+
${{ runner.os }}-pnpm-store-${{ env.cache-name }}-
97+
${{ runner.os }}-pnpm-store-
98+
${{ runner.os }}-
99+
81100
- name: Install deps
82101
run: pnpm install
83102

103+
- name: Install Playwright Chromium
104+
run: pnpm exec playwright install chromium --with-deps
105+
84106
- name: Run tests
85107
run: SKIP_ENV_VALIDATION=true pnpm run test:ci

0 commit comments

Comments
 (0)