Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9d311fb

Browse files
committed
Add unit testing workflow
1 parent 6ff951f commit 9d311fb

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

‎.github/workflows/run-tests.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /