-
Notifications
You must be signed in to change notification settings - Fork 187
50 lines (41 loc) · 1.16 KB
/
ci-cd.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: CI-CD
on: [push]
jobs:
build:
runs-on: ${{matrix.os}}
name: ${{matrix.os}}, Node ${{matrix.node}}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
node: [20]
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}
- name: Install NPM Dependencies
run: |
npm ci
- name: Linting and Unit testing
run: |
npm test
- name: Build the application
run: |
npm run build:ci
- name: Run E2E tests - Chrome / MacOS
if: ${{ runner.os == 'macOS' }}
run: |
npm run start &
npx playwright install chromium &
sleep 10
npx playwright test --project=chromium --reporter=list
- name: Run E2E tests - Firefox / Windows
if: ${{ runner.os == 'Windows' }}
run: |
npm run start &
npx playwright install firefox &
sleep 10
npx playwright test --project=firefox --reporter=list