-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 1.08 KB
/
coverage.yaml
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
on: ["push", "pull_request"]
name: Update Test Coverage
permissions:
contents: read
jobs:
coveralls:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
pip install -r src/requirements.txt
pip install coveralls
pip install pytest
- name: Generate Coverage Report
env:
PYTHONPATH: ./src
run: |
coverage run -m pytest tests/
coverage xml
- name: Upload Report to Coveralls
env:
GITHUB_TOKEN: ${{ secrets. GITHUB_TOKEN }}
run: coveralls
- name: Upload Report to Codacy
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml