We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 855e8f6 commit b2da5c3Copy full SHA for b2da5c3
.github/workflows/test.yml
@@ -0,0 +1,28 @@
1
+name: Tests
2
+on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ - name: Use Node.js
13
+ uses: actions/setup-node@v3
14
+ with:
15
+ node-version-file: '.nvmrc'
16
+ - name: Get npm cache directory
17
+ id: npm-cache-dir
18
+ run: |
19
+ echo "::set-output name=dir::$(npm config get cache)"
20
+ - uses: actions/cache@v3
21
+ id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
22
23
+ path: ${{ steps.npm-cache-dir.outputs.dir }}
24
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
25
+ restore-keys: |
26
+ ${{ runner.os }}-node-
27
+ - run: npm ci
28
+ - run: npm test
0 commit comments