-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (65 loc) · 1.91 KB
/
Copy pathcheck.yml
File metadata and controls
71 lines (65 loc) · 1.91 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: check
on:
push:
branches:
- main
- master
- develop
- 'updates/**'
- 'feature/**'
- 'features/**'
workflow_dispatch:
env:
PROJECT_NAME: psyki-python
WORKFLOW: check
jobs:
run-unit-tests:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
python-version:
- '3.9.13'
runs-on: ${{ matrix.os }}
name: Run tests on Python ${{ matrix.python-version }}, on ${{ matrix.os }}
timeout-minutes: 60
concurrency:
group: ${{ github.workflow }}-run-unit-tests-${{ matrix.python-version }}-${{ matrix.os }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
steps:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Restore Python dependencies
run: |
pip install -r requirements.txt
- name: Download datasets
run: python -m setup download_datasets
- name: Generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml --ignore=test/psyki/fairness --cov-config=.coveragerc
pytest --cov-append --cov=./ --cov-report=xml test/psyki/fairness --cov-config=.coveragerc
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: false