1414jobs :
1515 build :
1616 runs-on : ubuntu-latest
17+ env :
18+ NODE_VERSION : 18
19+ steps :
20+ - uses : actions/checkout@v2
21+ - name : Use Node.js ${{ env.NODE_VERSION }}
22+ uses : actions/setup-node@v2
23+ with :
24+ node-version : ${{ env.NODE_VERSION }}
25+ - name : Get npm cache directory
26+ id : npm-cache-dir
27+ run : |
28+ echo "::set-output name=dir::$(npm config get cache)"
29+ - name : Cache root node_modules
30+ id : cache-npm-root
31+ uses : actions/cache@v3
32+ with :
33+ path : |
34+ ${{ steps.npm-cache-dir.outputs.dir }}
35+ ./node_modules
36+ key : ${{ runner.os }}-node-root-${{ hashFiles('./package-lock.json') }}
37+ restore-keys : |
38+ ${{ runner.os }}-node-root-
39+ - name : Install dependencies
40+ if : ${{ steps.cache-npm-root.outputs.cache-hit != 'true' }}
41+ run : npm ci
42+ - name : Lerna bootstrap
43+ run : npx lerna bootstrap
44+ - name : Build
45+ run : npx lerna run build
46+
47+ test :
48+ runs-on : ubuntu-latest
49+ needs : build
1750 strategy :
1851 matrix :
19- node-version : [12.x, 14.x, 16.x, 18.x]
52+ # node-version: [12, 14, 16, 18]
53+ node-version : [18]
2054 steps :
2155 - uses : actions/checkout@v2
2256 - name : Use Node.js ${{ matrix.node-version }}
@@ -42,15 +76,18 @@ jobs:
4276 run : npm ci
4377 - name : Lerna bootstrap
4478 run : npx lerna bootstrap
45- - name : Build
46- run : npx lerna run build
4779 - name : Test
4880 run : npx lerna run test
4981 env :
5082 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
83+ - name : Find coverage files
84+ id : coverage-files
85+ run : |
86+ LCOV_FILES=$(find packages/ -type f -name "lcov.info" | paste -s -d ',' -)
87+ echo "::set-output name=list::$LCOV_FILES"
5188 - name : Run codacy-coverage-reporter
5289 if : github.event_name == 'push'
5390 uses : codacy/codacy-coverage-reporter-action@master
5491 with :
5592 project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
56- coverage-reports : coverage/lcov.info
93+ coverage-reports : ${{ steps. coverage-files.outputs.list }}
0 commit comments