-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.35 KB
/
python.yaml
File metadata and controls
55 lines (44 loc) · 1.35 KB
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
name: Python Code Coverage
on:
push:
branches:
- master
paths:
- "python/**"
jobs:
codacy-coverage:
defaults:
run:
working-directory: python
name: Run and Push Python Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- run: pip install pytest
- run: pip install coverage
- run: coverage run -m pytest
- run: coverage xml
- name: Download other coverage reports
uses: dawidd6/action-download-artifact@v2
with:
workflow: node.yaml
name: node-coverage-report
check_artifacts: true
- name: Upload Python Coverage
env:
CODACY_PROJECT_TOKEN: a95e7f2eaf7742eab01dbd7b526283c8
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml
- name: Upload Node Coverage
env:
CODACY_PROJECT_TOKEN: a95e7f2eaf7742eab01dbd7b526283c8
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ../lcov.info
- name: Archive code coverage
uses: actions/upload-artifact@v2
with:
name: python-coverage-report
path: python/coverage.xml