-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (31 loc) · 1.25 KB
/
code-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
# This workflow will run all test files with code coverage enabled and upload
# the results to coveralls.io. Only enabled for the main repository.
name: Code Coverage
on: [push, pull_request]
jobs:
coverage:
if: github.repository == 'leonhard-s/auraxium' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements.txt
python -m pip install coveralls
- name: Run tests
env:
SERVICE_ID: ${{secrets.REPO_SERVICE_ID}}
run: |
python -m coverage run --source auraxium/ -m unittest discover -p *_test.py tests/unit/
python -m coverage run --append --source auraxium/ -m unittest discover -p *_test.py tests/integration/
python -m coverage run --append --source auraxium/ -m unittest discover -p *_test.py tests/live/
- name: Upload code coverage analysis
env:
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}}
run: |
python -m coveralls