Skip to content

Commit 88ee809

Browse files
committed
CI fix
1 parent 4d27fdd commit 88ee809

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permissions:
55

66
on:
77
push:
8-
branches:
8+
branches:
99
- master
1010
pull_request:
1111
branches:
@@ -14,17 +14,14 @@ on:
1414
jobs:
1515
setup:
1616
runs-on: ubuntu-latest
17-
outputs:
18-
cache-key: ${{ steps.deps-cache.outputs.cache-hit }}
1917
steps:
2018
- uses: actions/checkout@v4
2119

2220
- uses: actions/setup-node@v4
2321
with:
2422
node-version: lts/*
2523

26-
- name: Cache node_modules
27-
id: deps-cache
24+
- name: Cache node_modules and Playwright
2825
uses: actions/cache@v4
2926
with:
3027
path: |
@@ -37,16 +34,9 @@ jobs:
3734
- name: Install dependencies
3835
run: npm ci
3936

40-
- name: Install Playwright browsers (cached)
37+
- name: Install Playwright browsers
4138
run: npx playwright install --with-deps
4239

43-
- name: Upload node_modules for reuse
44-
if: steps.deps-cache.outputs.cache-hit != 'true'
45-
uses: actions/upload-artifact@v4
46-
with:
47-
name: node_modules
48-
path: node_modules
49-
5040
lint:
5141
needs: setup
5242
runs-on: ubuntu-latest
@@ -55,12 +45,17 @@ jobs:
5545
- uses: actions/setup-node@v4
5646
with:
5747
node-version: lts/*
58-
- uses: actions/download-artifact@v4
48+
- name: Restore node_modules cache
49+
uses: actions/cache@v4
5950
with:
60-
name: node_modules
61-
path: node_modules
51+
path: |
52+
node_modules
53+
~/.cache/ms-playwright
54+
key: deps-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
55+
restore-keys: |
56+
deps-${{ runner.os }}-
6257
- name: Run lint check
63-
run: ./node_modules/.bin/eslint ./src
58+
run: npx eslint ./src
6459

6560
typescript:
6661
needs: lint
@@ -70,12 +65,17 @@ jobs:
7065
- uses: actions/setup-node@v4
7166
with:
7267
node-version: lts/*
73-
- uses: actions/download-artifact@v4
68+
- name: Restore node_modules cache
69+
uses: actions/cache@v4
7470
with:
75-
name: node_modules
76-
path: node_modules
71+
path: |
72+
node_modules
73+
~/.cache/ms-playwright
74+
key: deps-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
75+
restore-keys: |
76+
deps-${{ runner.os }}-
7777
- name: Run TypeScript check
78-
run: ./node_modules/.bin/tsc
78+
run: npx tsc
7979

8080
playwright:
8181
needs: typescript
@@ -85,12 +85,15 @@ jobs:
8585
- uses: actions/setup-node@v4
8686
with:
8787
node-version: lts/*
88-
- uses: actions/download-artifact@v4
88+
- name: Restore node_modules cache
89+
uses: actions/cache@v4
8990
with:
90-
name: node_modules
91-
path: node_modules
92-
- name: Install Playwright browsers (cached)
93-
run: npx playwright install --with-deps
91+
path: |
92+
node_modules
93+
~/.cache/ms-playwright
94+
key: deps-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
95+
restore-keys: |
96+
deps-${{ runner.os }}-
9497
- name: Run Playwright tests
9598
run: npx playwright test
9699
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)