-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (92 loc) · 2.43 KB
/
run-test.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Full Test & Upload coverage
on:
push:
branches:
- '**'
pull_request:
jobs:
run_playwright:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 16
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "yarn install"
working-directory: frontend
run: yarn --check-files --frozen-lockfile --non-interactive
- name: "run-test"
run: |
docker compose build
docker compose up -d
until curl -f http://localhost:8000/api/ping/
do
echo "not success"
sleep 1
done
cd frontend
npx playwright test --workers=1 e2e/tutorial_scenario.spec.js
npx playwright test e2e/user/
- name: "save imgs"
uses: actions/upload-artifact@v4
with:
path: frontend/imgs/*
name: imgs
run_jest:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 16
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "yarn install"
working-directory: frontend
run: yarn --check-files --frozen-lockfile --non-interactive
- name: "jest"
working-directory: frontend
run: yarn test:unit --coverage
- name: "save coverage"
uses: actions/upload-artifact@v4
with:
path: frontend/coverage/
name: coverage
run_pytest:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: "3.7"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run test
shell: bash
run: |
docker compose -f compose-test.yaml up --exit-code-from backend
- name: "save coverage"
uses: actions/upload-artifact@v4
with:
name: coverage
path: backend/recotem/coverage.xml
upload-coverage:
runs-on: ubuntu-latest
needs: [run_jest, run_pytest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "download coverage results"
uses: actions/download-artifact@v4
with:
name: coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
verbose: false
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false