-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.32 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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r api/requirements.txt
- name: Run backend tests
run: |
export PYTHONPATH=$(pwd)
pytest --cov=api api/tests/ --cov-report=xml
- name: Upload backend coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: backend
- name: Upload backend coverage to Codecov via PIP CLI
run: |
pip install codecov-cli
codecovcli --verbose upload-process --disable-search -n 'backend-job'-${{ github.run_id }} -F backend -f coverage.xml -t ${{ secrets.CODECOV_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install frontend dependencies
run: npm install
- name: Run frontend tests
run: npm run test
- name: Upload frontend coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: frontend