@@ -21,18 +21,46 @@ jobs:
2121 # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2222
2323 steps :
24- - uses : actions/checkout@v3
25- - name : Use Node.js ${{ matrix.node-version }}
26- uses : actions/setup-node@v1
27- with :
28- node-version : ${{ matrix.node-version }}
29- cache : ' npm'
30- - run : npm i
31- - run : npm run build --if-present
32- - run : npm run coverage
33- - if : ${{ matrix.node-version == '14.x' && matrix.os == 'ubuntu-latest' }}
34- name : Upload coverage to Codecov
35- uses : codecov/codecov-action@v2
36- with :
37- token : ${{ secrets.CODECOV_TOKEN }}
38- directory : ./coverage
24+ - name : Checkout
25+ uses : actions/checkout@v3
26+
27+ - name : Install Node.js ${{ matrix.node-version }}
28+ uses : actions/setup-node@v1
29+ with :
30+ node-version : ${{ matrix.node-version }}
31+ cache : ' npm'
32+
33+ - name : Install pnpm
34+ uses : pnpm/action-setup@v2.2.1
35+ id : pnpm-install
36+ with :
37+ version : 7
38+ run_install : false
39+
40+ - name : Get pnpm store directory
41+ id : pnpm-cache
42+ run : |
43+ echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
44+
45+ - name : Setup pnpm cache
46+ uses : actions/cache@v3
47+ with :
48+ path : ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
49+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
50+ restore-keys : |
51+ ${{ runner.os }}-pnpm-store-
52+
53+ - name : Install dependencies
54+ run : pnpm install
55+
56+ - name : Tests
57+ run : |
58+ npm run lint
59+ npm run compile
60+ npm run coverage
61+ - if : ${{ matrix.node-version == '16.x' && matrix.os == 'ubuntu-latest' }}
62+ name : Upload coverage to Codecov
63+ uses : codecov/codecov-action@v2
64+ with :
65+ token : ${{ secrets.CODECOV_TOKEN }}
66+ directory : ./coverage
0 commit comments