Skip to content

Commit c0312bf

Browse files
committed
Add github actions to run test on master push
1 parent 5d29e5a commit c0312bf

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: E2E Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
e2e:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '20'
16+
- run: npm run test-ci

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"e2e:interactive": "npx playwright test --ui",
3838
"unit-tests": "karma start",
3939
"unit-tests:watch": "karma start --auto-watch --no-single-run",
40-
"test": "npm run unit-tests; npm run e2e"
40+
"test": "npm run unit-tests; npm run e2e",
41+
"test-ci": "bash ./run-test-ci.sh"
4142
},
4243
"devDependencies": {
4344
"@playwright/test": "^1.52.0",

run-test-ci.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
npm run unit-tests
2+
UT=$?
3+
npm run e2e
4+
E2E=$?
5+
exit $((UT + E2E))

0 commit comments

Comments
 (0)