-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.4 KB
/
ci.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI/CD Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-app:
name: Test App
runs-on: ubuntu-latest
steps:
# Check out repository code
- name: Checkout code
uses: actions/checkout@v4
# Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Create env file
working-directory: ./server
run: echo "JWT_SECRET_KEY=D4fg0Eg6pk" >> .env
# Install dependencies and run app tests
- name: Setup server
working-directory: ./server
run: |
npm ci
- name: Setup socket
working-directory: ./socket
run: |
npm ci
- name: setup client
working-directory: ./client
run: |
npm ci
npm run start:test
npx wait-on --timeout 5000 http://localhost:3000
npx wait-on --timeout 5000 http://localhost:3020
npx wait-on --timeout 5000 http://localhost:5173
- name: install playwright browser
working-directory: ./client
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./client
run: npx playwright test --reporter=line
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30