11name : Test & Build
2- on : [pull_request]
2+
3+ on : [push, pull_request]
4+
5+ concurrency :
6+ group : ${{ github.workflow }}-${{ github.ref }}
7+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
8+
39jobs :
410 test :
5- runs-on : ubuntu-18.04
11+ runs-on : ubuntu-latest
612 steps :
7- - uses : actions/checkout@v3
8- - uses : actions/setup-node@v3
13+ - uses : actions/checkout@v4
14+ - uses : actions/setup-node@v4
915 with :
10- node-version : 16
11- cache : yarn
12- - uses : actions/cache@v3
13- id : yarn -cache
16+ node-version : 20
17+ cache : pnpm
18+ - uses : actions/cache@v4
19+ id : pnpm -cache
1420 with :
1521 path : node_modules
16- key : ${{ runner.os }}-yarn -${{ hashFiles('**/yarn. lock') }}
17- restore-keys : ${{ runner.os }}-yarn -
22+ key : ${{ runner.os }}-pnpm -${{ hashFiles('**/pnpm- lock.yaml ') }}
23+ restore-keys : ${{ runner.os }}-pnpm -
1824
1925 - name : Install dependencies
20- run : yarn install --frozen-lockfile
26+ run : pnpm install
2127
2228 - name : Test with Coverage
23- run : yarn coverage
29+ run : pnpm run coverage
2430
2531 - name : ESLint
26- run : yarn eslint
32+ run : pnpm run eslint
2733
2834 - name : Report Coverage
2935 uses : coverallsapp/github-action@master
@@ -37,25 +43,23 @@ jobs:
3743 - uses : actions/setup-node@v3
3844 with :
3945 node-version : 16
40- cache : yarn
46+ cache : pnpm
4147 - uses : actions/cache@v3
42- id : yarn -cache
48+ id : pnpm -cache
4349 with :
4450 path : ' **/node_modules'
45- key : ${{ runner.os }}-yarn -${{ hashFiles('**/yarn. lock') }}
46- restore-keys : ${{ runner.os }}-yarn -
51+ key : ${{ runner.os }}-pnpm -${{ hashFiles('**/pnpm- lock.yaml ') }}
52+ restore-keys : ${{ runner.os }}-pnpm -
4753
4854 - name : Install dependencies
49- run : yarn install --frozen-lockfile --prefer-offline
55+ run : pnpm install --frozen-lockfile --prefer-offline
5056
5157 - name : Build Dist
52- run : yarn build
58+ run : pnpm build
5359
5460 - name : Bundlewatch
5561 run : npx bundlewatch
5662
5763 - name : Build Docs
5864 run : |
59- cd docs
60- yarn install --frozen-lockfile --prefer-offline
61- yarn build
65+ npm run build:docs
0 commit comments