-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 1.35 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
65
66
67
name: CI/CD Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
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: Setup server
working-directory: server
run: npm i
- name: Setup socket
working-directory: socket
run: npm i
- name: setup client
working-directory: client
run: npm i
- name: Run app
working-directory: client
run: |
nohup npm run start:test &
sleep 10
env:
JWT_SECRET_KEY: ${{secrets.JWT_SECRET_KEY}}
VITE_SERVER_HOST: 0.0.0.0
VITE_SERVER_PORT: 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
env:
VITE_SERVER_HOST: 0.0.0.0
VITE_SERVER_PORT: 5173
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30