forked from scitokens/scitokens
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.04 KB
/
python-coverage.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
name: codacy-coverage-reporter
on: ["push"]
jobs:
codacy-coverage-reporter:
runs-on: ubuntu-latest
name: codacy-coverage-reporter
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest coverage
if [ -f requirements.txt ]; then
sed -i 's/>=/==/g' requirements.txt
pip install -r requirements.txt
fi
- name: List installed packages
run: python -m pip list installed
- name: Test with pytest
run: |
coverage run -m pytest
coverage xml
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# or
# api-token: ${{ secrets.CODACY_API_TOKEN }}
coverage-reports: coverage.xml