1010
1111 workflow_dispatch :
1212
13+ # https://stackoverflow.com/a/72408109/3443137
14+ concurrency :
15+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+ cancel-in-progress : true
17+
1318jobs :
1419 test :
15- runs-on : ubuntu-20.04
20+ runs-on : ubuntu-22.04
21+ timeout-minutes : 120
1622 steps :
1723 - uses : actions/checkout@v4
1824 - name : Setup Node.js environment
3844 rm -f node_modules/__ngcc_entry_points__.json
3945 npm install --legacy-peer-deps --force
4046
41- - name : build
42- run : npm run build
47+ - run : npm run build
4348
4449 - name : test:aws
4550 uses : GabrielBB/xvfb-action@v1
6772 with :
6873 run : npm run test:firebase
6974
75+ - run : npm run measure:size
76+ - run : npm run aggregate-metrics
77+
78+ - name : lint
79+ run : npm run lint
80+
81+
82+ test-some :
83+ runs-on : ubuntu-22.04
84+ timeout-minutes : 60
85+ steps :
86+ - uses : actions/checkout@v4
87+ - name : Setup Node.js environment
88+ uses : actions/setup-node@v4.0.0
89+ with :
90+ node-version-file : ' .nvmrc'
91+
92+ - name : Reuse npm cache folder
93+ uses : actions/cache@v3
94+ env :
95+ cache-name : cache-node-modules
96+ with :
97+ path : |
98+ ~/.npm
99+ ./node_modules
100+ # invalidate cache when any package-lock.json changes
101+ key : ${{ runner.os }}-npm-test-x2-${{ hashFiles('**/package.json') }}
102+ restore-keys : |
103+ ${{ runner.os }}-npm-test-x2-
104+
105+ - name : install npm dependencies
106+ run : |
107+ rm -f node_modules/__ngcc_entry_points__.json
108+ npm install --legacy-peer-deps --force
109+
110+ - run : npm run build
111+
70112 - name : test:pouchdb
71113 uses : GabrielBB/xvfb-action@v1
72114 with :
@@ -86,12 +128,3 @@ jobs:
86128 uses : GabrielBB/xvfb-action@v1
87129 with :
88130 run : npm run test:watermelondb
89-
90- - name : measure build size
91- run : npm run measure:size
92-
93- - name : aggregate metrics
94- run : npm run aggregate-metrics
95-
96- - name : lint
97- run : npm run lint
0 commit comments