-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (42 loc) · 1.38 KB
/
ci_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Run tests
on:
workflow_dispatch:
workflow_call:
push:
branches:
- '**'
tags-ignore:
- '**'
concurrency:
group: run-tests-group-${{ github.ref }}
cancel-in-progress: true
jobs:
ci_tests:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
node: [18, 20]
name: ${{ matrix.os }}_node${{ matrix.node }}
runs-on: ${{ matrix.os }}
steps:
- name: Setup
uses: dsi-hug/actions/setup@v2
with:
node-version: ${{ matrix.node }}
setup-chrome: true
- name: Build tests application
working-directory: projects/tests-app
run: npm run build
- name: Serve tests application
working-directory: dist/tests-app
shell: bash # use bash because powershell is used by default on Windows and background job are cleaned after the run
# use global install (instead of npx) because otherwise the server won't stay up on Windows
run: |
npm install -g http-server
http-server --port=4200 &
- name: Make sure tests application is running
shell: bash # use bash so that sleep is recognized even on Windows
run: sleep 5 && curl http://localhost:4200 -I
- name: Run tests
working-directory: projects/tests-e2e
run: npm run start -- --watch=false --debug=false --headless=true