-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (47 loc) · 1.2 KB
/
checks.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
name: checks
on:
pull_request:
branches:
- main
concurrency:
group: check-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check:
name: Check with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.10"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changed:
- 'pyproject.toml'
- 'src/**'
- 'tests/**'
- uses: actions/checkout@v4
if: steps.filter.outputs.changed == 'true'
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.py }}
if: steps.filter.outputs.changed == 'true'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install package
if: steps.filter.outputs.changed == 'true'
run: |
pip install --upgrade pip
python -m pip install .[all]
- name: Run test suite
if: steps.filter.outputs.changed == 'true'
run: pytest tests