-
-
Notifications
You must be signed in to change notification settings - Fork 134
40 lines (37 loc) · 1.19 KB
/
run_pytest.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
name: Light-weight Unit Tests
on: pull_request
jobs:
pytest_not_stress:
name: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Create venv
run: python -m venv venv
- uses: actions/cache@v3
id: cache
with:
path: /home/runner/work/automlbenchmark/automlbenchmark/venv
key: pip-v3-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
pip-v3-
- name: Install Requirements
if: steps.cache.outputs.cache-hit != 'true'
run: |
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run unit tests
run: |
source venv/bin/activate
coverage run -m pytest -vv -m "not stress and not openml_upload"
coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}