|
6 | 6 | pull_request: |
7 | 7 |
|
8 | 8 | jobs: |
| 9 | + pre-commit: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - name: Check out Git repository |
| 13 | + uses: actions/checkout@v4 |
| 14 | + |
| 15 | + - name: Set up Python |
| 16 | + uses: actions/setup-python@v5 |
| 17 | + with: |
| 18 | + python-version: "3.12" |
| 19 | + |
| 20 | + - name: Run pre-commit |
| 21 | + uses: pre-commit/action@v3.0.1 |
| 22 | + test: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + python-version: ["3.12"] |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Check out Git repository |
| 30 | + uses: actions/checkout@v4 |
| 31 | + |
| 32 | + - name: Set up Python ${{ matrix.python-version }} |
| 33 | + uses: actions/setup-python@v5 |
| 34 | + with: |
| 35 | + python-version: ${{ matrix.python-version }} |
| 36 | + - name: Install dependencies |
| 37 | + run: | |
| 38 | + python -m pip install --upgrade pip |
| 39 | + pip install ruff pytest numpy setuptools>=66 wheel>=0.36 build |
| 40 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 41 | + if [ -f pyproject.toml ]; then pip install -e .; fi |
| 42 | +
|
| 43 | + - name: Run Test |
| 44 | + run: | |
| 45 | + python -m pytest |
9 | 46 | lint: |
10 | 47 | runs-on: ubuntu-latest |
11 | 48 | strategy: |
|
62 | 99 | run: | |
63 | 100 | # Check Python code blocks in documentation |
64 | 101 | blacken-docs --check **/*.md **/*.rst || true # Allow failure for now |
65 | | -
|
66 | | - pre-commit: |
67 | | - runs-on: ubuntu-latest |
68 | | - steps: |
69 | | - - name: Check out Git repository |
70 | | - uses: actions/checkout@v4 |
71 | | - |
72 | | - - name: Set up Python |
73 | | - uses: actions/setup-python@v5 |
74 | | - with: |
75 | | - python-version: "3.12" |
76 | | - |
77 | | - - name: Run pre-commit |
78 | | - uses: pre-commit/action@v3.0.1 |
79 | | - test: |
80 | | - runs-on: ubuntu-latest |
81 | | - strategy: |
82 | | - matrix: |
83 | | - python-version: ["3.12"] |
84 | | - |
85 | | - steps: |
86 | | - - name: Check out Git repository |
87 | | - uses: actions/checkout@v4 |
88 | | - |
89 | | - - name: Set up Python ${{ matrix.python-version }} |
90 | | - uses: actions/setup-python@v5 |
91 | | - with: |
92 | | - python-version: ${{ matrix.python-version }} |
93 | | - - name: Install dependencies |
94 | | - run: | |
95 | | - python -m pip install --upgrade pip |
96 | | - pip install ruff pytest numpy setuptools>=66 wheel>=0.36 build |
97 | | - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
98 | | - if [ -f pyproject.toml ]; then pip install -e .; fi |
99 | | -
|
100 | | - - name: Run Test |
101 | | - run: | |
102 | | - python -m pytest |
0 commit comments