Skip to content

Commit 99a35c4

Browse files
committed
chore(project): Add e2e tests to github actions
1 parent e980d65 commit 99a35c4

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

.github/workflows/test-e2e.js.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: E2E tests
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
11+
12+
jobs:
13+
test-e2e:
14+
name: Run e2e tests
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [18.x, 20.x]
20+
21+
steps:
22+
- name: Check out Git repository
23+
uses: actions/checkout@v3
24+
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: Install Node.js dependencies
31+
run: npm ci
32+
33+
- name: Run e2e tests
34+
uses: cypress-io/github-action@v5
35+
with:
36+
build: npm run build
37+
start: npm run serve:e2e
38+
command: npm run test:e2e:ci

.github/workflows/test.js.yml renamed to .github/workflows/test-unit.js.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: Test
4+
name: Unit tests
55

66
on:
77
push:
@@ -10,8 +10,8 @@ on:
1010
branches: [master]
1111

1212
jobs:
13-
build:
14-
name: Run tests
13+
test-unit:
14+
name: Run unit tests
1515
runs-on: ubuntu-latest
1616

1717
strategy:
@@ -30,5 +30,5 @@ jobs:
3030
- name: Install Node.js dependencies
3131
run: npm ci
3232

33-
- name: Run tests
33+
- name: Run unit tests
3434
run: npm run test

cypress.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function setupNodeEvents(on, config) {
1919
}
2020

2121
export default defineConfig({
22-
defaultCommandTimeout: 1000,
22+
defaultCommandTimeout: 2000,
2323
e2e: {
2424
baseUrl: 'http://localhost:8080',
2525
experimentalRunAllSpecs: true,

0 commit comments

Comments
 (0)