-
Notifications
You must be signed in to change notification settings - Fork 54
40 lines (40 loc) · 1.16 KB
/
python_tests.yml
File metadata and controls
40 lines (40 loc) · 1.16 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
name: Python tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
run_tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 720
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-15, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Look out for file changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
target_files:
- '**/*.py'
- '.github/workflows/**'
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
if: steps.changes.outputs.target_files == 'true'
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: steps.changes.outputs.target_files == 'true'
run: |
python -m pip install -e .[github]
- name: Run tests with pytest
if: steps.changes.outputs.target_files == 'true'
run: |
pytest -vv --suppress-no-test-exit-code