We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ff951f commit 9d311fbCopy full SHA for 9d311fb
.github/workflows/run-tests.yml
@@ -0,0 +1,38 @@
1
+name: Run Tests
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
9
10
11
+jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v3
18
19
+ - name: Set up Node.js
20
+ uses: actions/setup-node@v3
21
+ with:
22
+ node-version: '14'
23
24
+ - name: Install dependencies
25
+ run: npm ci
26
27
+ - name: Run tests
28
+ run: npm run test
29
30
+ - name: Check test status
31
+ run: |
32
+ if [ $? -ne 0 ]; then
33
+ echo "Tests failed. Failing the workflow."
34
+ exit 1
35
+ else
36
+ echo "Tests passed."
37
+ fi
38
0 commit comments