-
Notifications
You must be signed in to change notification settings - Fork 67
68 lines (56 loc) · 1.8 KB
/
Copy pathpython.yml
File metadata and controls
68 lines (56 loc) · 1.8 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Python Wheel
on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
concurrency:
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
changes:
uses: ./.github/workflows/changes.yml
python-quality:
needs: changes
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.python_quality == 'true') }}
name: Python formatting and linting
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
cache: pip
- name: Install Ruff
run: python -m pip install "ruff==0.16.1"
- name: Check Python
run: ./scripts/check-python.sh
- name: Check release automation
run: |
ruff format --check .github/scripts
ruff check .github/scripts
python -m unittest discover -s .github/scripts -p 'test_*.py'
python-build:
needs: changes
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.python_build == 'true') }}
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.14"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install system dependencies
run: sudo apt-get update -qq && sudo apt-get install -y cmake
- name: Upgrade pip
run: pip install --upgrade pip
- name: Build and install wheel
run: pip install ".[test]" -v
- name: Run pytest
run: pytest --tb=short -q