Skip to content

Commit 19ccac1

Browse files
author
Muhammad Rehan Alam
committed
chore(github actions): adds github action to run test
1 parent e2ccf65 commit 19ccac1

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Authlete Demo App Tests
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: 20
17+
- name: Install dependencies
18+
run: npm ci
19+
- name: Run Tests
20+
run: npm run test
21+
- name: Upload Coverage
22+
if: success()
23+
uses: actions/upload-artifact@v3
24+
with:
25+
name: coverage-report
26+
path: coverage/

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"start": "next start",
1010
"lint": "eslint",
1111
"lint:fix": "eslint --fix",
12-
"test": "vitest"
12+
"test": "vitest",
13+
"test:watch": "vitest watch",
14+
"test:coverage": "vitest run --coverage"
1315
},
1416
"dependencies": {
1517
"@authlete/typescript-sdk": "^0.0.2-beta",

0 commit comments

Comments
 (0)