File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test and Build
2+
3+ on :
4+ pull_request :
5+ branches : [ main ]
6+ types : [opened, synchronize, reopened]
7+
8+ jobs :
9+ test-and-build :
10+ runs-on : ubuntu-latest
11+
12+ strategy :
13+ matrix :
14+ node-version : [20.x]
15+ job-type : [test, build]
16+
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+
21+ - name : Enable Corepack
22+ run : corepack enable
23+
24+ - name : Setup Node.js
25+ uses : actions/setup-node@v4
26+ with :
27+ cache : " yarn"
28+ cache-dependency-path : " yarn.lock"
29+ node-version-file : " .nvmrc"
30+
31+ - name : Install dependencies
32+ run : yarn install --frozen-lockfile
33+
34+ - name : Run tests
35+ if : matrix.job-type == 'test'
36+ run : yarn test
37+
38+ - name : Build project
39+ if : matrix.job-type == 'build'
40+ run : yarn build
41+
You can’t perform that action at this time.
0 commit comments