Skip to content

Commit 55c8fe5

Browse files
committed
Simplify CI, deduplicate Chrome & Firefox tests
1 parent 1f148f5 commit 55c8fe5

File tree

1 file changed

+13
-31
lines changed

1 file changed

+13
-31
lines changed

.github/workflows/browser-tests.yml

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,46 +18,34 @@ jobs:
1818
BROWSER: ["chrome", "firefox"]
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Use Node.js ${{ env.NODE_VERSION }}
24-
uses: actions/setup-node@v4
24+
uses: actions/setup-node@v6
2525
with:
2626
node-version: ${{ env.NODE_VERSION }}
27-
28-
- name: Cache
29-
uses: actions/cache@v4
30-
with:
31-
path: ~/.npm
32-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
33-
restore-keys: |
34-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
27+
cache: npm
28+
cache-dependency-path: '**/package-lock.json'
3529

3630
- name: Install dependencies
3731
run: npm ci
3832

3933
- name: Run tests
40-
run: npm run test:browser
34+
run: npm run test:unit -- -b ${{ matrix.BROWSER }} --headless
4135

4236
ie:
4337
runs-on: windows-latest
4438
name: Edge in IE mode
4539
steps:
4640
- name: Checkout
47-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
uses: actions/checkout@v6
4842

4943
- name: Use Node.js ${{ env.NODE_VERSION }}
50-
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
44+
uses: actions/setup-node@v6
5145
with:
5246
node-version: ${{ env.NODE_VERSION }}
53-
54-
- name: Cache
55-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
56-
with:
57-
path: ~/.npm
58-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
59-
restore-keys: |
60-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
47+
cache: npm
48+
cache-dependency-path: '**/package-lock.json'
6149

6250
- name: Install dependencies
6351
run: npm ci
@@ -71,20 +59,14 @@ jobs:
7159
name: Safari
7260
steps:
7361
- name: Checkout
74-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
62+
uses: actions/checkout@v6
7563

7664
- name: Use Node.js ${{ env.NODE_VERSION }}
77-
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
65+
uses: actions/setup-node@v6
7866
with:
7967
node-version: ${{ env.NODE_VERSION }}
80-
81-
- name: Cache
82-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
83-
with:
84-
path: ~/.npm
85-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
86-
restore-keys: |
87-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
68+
cache: npm
69+
cache-dependency-path: '**/package-lock.json'
8870

8971
- name: Install dependencies
9072
run: npm ci

0 commit comments

Comments
 (0)