-
Notifications
You must be signed in to change notification settings - Fork 56
37 lines (35 loc) · 1.5 KB
/
measure-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
36
name: Measure coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
measure-coverage:
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.repository == 'toruseo/UXsim') ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.repository == 'toruseo/UXsim')
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uxsim and dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Install pytest other dependencies
run: pip install pytest pytest-rerunfailures pytest-xdist pytest-cov setuptools osmnx requests
- name: Run verifications with pytest
run: pytest -n auto tests/test_verification_straight_road.py tests/test_verification_route_choice.py tests/test_verification_node.py tests/test_verification_exceptional.py tests/test_verification_sioux_falls.py tests/test_verification_multilane.py tests/test_verification_taxi.py tests/test_other_functions.py --durations=0 -v --cov=uxsim --cov-report=xml --cov-config=.github/.coveragerc
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: true
verbose: true