-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (41 loc) · 1.5 KB
/
python-testing.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: tests
on:
push:
pull_request:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Cache python environment
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('pyproject.toml') }}
- name: Install system dependencies using apt
run: |
sudo apt-get update && sudo apt-get -y install libboost-all-dev build-essential
- name: Install Dependencies
run: pip install --upgrade pip wheel && pip install .[dev]
- name: Test with pytest
run: |
pytest -vvv --junitxml=test-junit-reports/result.xml test/
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: Unit Test Results
files: test-junit-reports/*.xml
report_individual_runs: true
deduplicate_classes_by_file_name: false