Skip to content

Commit 391bd7c

Browse files
committed
chore: update ci workflow
1 parent 0f85d24 commit 391bd7c

File tree

1 file changed

+32
-53
lines changed

1 file changed

+32
-53
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,7 @@ jobs:
1212
uses: actions/setup-node@v4
1313
with:
1414
node-version: 16
15-
16-
- name: Yarn cache directory
17-
id: yarn-cache
18-
run: echo "::set-output name=dir::$(yarn cache dir)"
19-
20-
- name: Yarn cache
21-
uses: actions/cache@v4
22-
with:
23-
path: ${{ steps.yarn-cache.outputs.dir }}
24-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
25-
restore-keys: |
26-
${{ runner.os }}-yarn-
15+
cache: 'yarn'
2716

2817
- name: Install dependencies
2918
run: yarn install --frozen-lockfile
@@ -32,7 +21,7 @@ jobs:
3221
run: yarn build
3322

3423
- name: Upload build artifact
35-
uses: actions/upload-artifact@v3
24+
uses: actions/upload-artifact@v4
3625
with:
3726
name: lib
3827
path: lib
@@ -46,45 +35,34 @@ jobs:
4635
os: [ubuntu-latest, macos-latest, windows-latest]
4736
fail-fast: false
4837
steps:
49-
- uses: actions/checkout@v4
50-
51-
- name: Setup node
52-
uses: actions/setup-node@v4
53-
with:
54-
node-version: ${{ matrix.node }}
55-
56-
- name: Yarn cache directory
57-
id: yarn-cache
58-
run: echo "::set-output name=dir::$(yarn cache dir)"
59-
60-
- name: Yarn cache
61-
uses: actions/cache@v4
62-
with:
63-
path: ${{ steps.yarn-cache.outputs.dir }}
64-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
65-
restore-keys: |
66-
${{ runner.os }}-yarn-
67-
68-
- name: Locks cache
69-
uses: actions/cache@v4
70-
with:
71-
path: test/e2e/__locks__
72-
key: ${{ runner.os }}-locks
73-
74-
- name: Install dependencies
75-
run: yarn install --frozen-lockfile
76-
77-
- name: Download build artifact
78-
uses: actions/download-artifact@v3
79-
with:
80-
name: lib
81-
path: lib
82-
83-
- name: Run unit tests
84-
run: yarn test:unit
85-
86-
- name: Run e2e tests
87-
run: yarn test:e2e
38+
- uses: actions/checkout@v4
39+
40+
- name: Setup node
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: ${{ matrix.node }}
44+
cache: 'yarn'
45+
46+
- name: Locks cache
47+
uses: actions/cache@v4
48+
with:
49+
path: test/e2e/__locks__
50+
key: ${{ runner.os }}-locks
51+
52+
- name: Install dependencies
53+
run: yarn install --frozen-lockfile
54+
55+
- name: Download build artifact
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: lib
59+
path: lib
60+
61+
- name: Run unit tests
62+
run: yarn test:unit
63+
64+
- name: Run e2e tests
65+
run: yarn test:e2e
8866

8967
release:
9068
runs-on: ubuntu-latest
@@ -102,12 +80,13 @@ jobs:
10280
uses: actions/setup-node@v4
10381
with:
10482
node-version: 16
83+
cache: 'yarn'
10584

10685
- name: Install dependencies
10786
run: yarn install --frozen-lockfile
10887

10988
- name: Download build artifact
110-
uses: actions/download-artifact@v3
89+
uses: actions/download-artifact@v4
11190
with:
11291
name: lib
11392
path: lib

0 commit comments

Comments
 (0)