Skip to content

Commit 886a634

Browse files
authored
ci: setup multiple envs (#300)
1 parent f88b137 commit 886a634

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

.github/workflows/validation.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,29 @@ on: push
44

55
jobs:
66
validation:
7+
name: Testing on Node ${{ matrix.node-version }}
78
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node-version: [12, 14, 16, 17]
812
steps:
9-
- uses: actions/checkout@master
10-
- name: Use Node.js 12.x
11-
uses: actions/setup-node@v1
12-
with:
13-
node-version: 12.x
14-
- name: Cache Node.js modules
15-
uses: actions/cache@v2
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
16+
- name: Use Node ${{ matrix.node-version }}
17+
uses: actions/setup-node@master
1618
with:
17-
path: ~/.npm
18-
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
19-
restore-keys: |
20-
${{ runner.OS }}-node-
21-
- name: Install dependencies
22-
run: npm install
23-
- name: Lint
24-
run: npm run lint
19+
node-version: ${{ matrix.node-version }}
20+
21+
- name: Get yarn cache
22+
uses: c-hive/gha-yarn-cache@v2
23+
24+
- name: Install Dependencies using Yarn
25+
run: yarn --ignore-engines
26+
2527
- name: Tests
26-
run: npm run test:only
28+
run: yarn test:ci
29+
2730
- name: Upload coverage to Codecov
2831
uses: codecov/codecov-action@v1
2932
with:

0 commit comments

Comments
 (0)