-
Notifications
You must be signed in to change notification settings - Fork 112
48 lines (46 loc) · 1.28 KB
/
python.yaml
File metadata and controls
48 lines (46 loc) · 1.28 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
41
42
43
44
45
46
47
48
name: Python checks
on:
push:
branches: [ main ]
paths-ignore:
- "**.md"
- ".devcontainer/**"
- ".github/**"
- "example_results/**"
- "example_input/**"
pull_request:
branches: [ main ]
paths-ignore:
- "**.md"
- ".devcontainer/**"
- ".github/**"
- "example_results/**"
- "example_input/**"
workflow_call:
jobs:
test_package:
name: Test ${{ matrix.os }} Python ${{ matrix.python_version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# macos-13 is x84 and macos-14-large is arm64
os: ["ubuntu-latest", "windows-latest", "macos-13", "macos-14-large"]
python_version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v5
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Lint with ruff
run: ruff check .
- name: Check formatting with ruff
run: ruff format . --check
- name: Run Pytest tests
run: python -m pytest