-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (41 loc) · 1.38 KB
/
python-testing-linux.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
# 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: Linux
env:
ROOT_DIR: /home/runner/work/astrohack/astrohack/src/astrohack
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**.rst'
- 'disabled_tests/*.py'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9","3.10","3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies with pip
run: |
python -m pip install --upgrade pip
pip install .
- name: Test with pytest
run: |
pytest -v tests/ --html=test-results.html --self-contained-html --cov=astrohack --no-cov-on-fail --cov-report=html --doctest-modules
- name: Upload pytest test results and coverage reports
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: |
./test-results.html
./htmlcov
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}