Skip to content

Commit 54ae9c3

Browse files
committed
ci(test): initial version
1 parent de0ed84 commit 54ae9c3

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
jobs:
10+
test_matrix:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node_version: ["12", "14"]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node_version }}
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: ${{ matrix.node_version }}
22+
- uses: actions/cache@v2
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node-
28+
- run: npm ci
29+
- run: npm test
30+
31+
# The "test" step can be required in branch protection and does not
32+
# change each time the test matrix changes.
33+
test:
34+
runs-on: ubuntu-latest
35+
needs: test_matrix
36+
steps:
37+
- run: echo ok

0 commit comments

Comments
 (0)