Skip to content

Commit 1ab8bc0

Browse files
authored
Merge pull request #30 from tnijboer/v2
fix test workflow
2 parents 3589485 + c345529 commit 1ab8bc0

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

.github/workflows/.tests-matrix.yaml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
run-pytest:
1515
required: true
1616
type: boolean
17-
run-ruff-format:
17+
run-black:
1818
required: true
1919
type: boolean
2020
run-ruff-check:
@@ -44,6 +44,8 @@ jobs:
4444
python-version: ${{ inputs.python-version }}
4545

4646
- uses: ./.github/actions/poetry-install
47+
with:
48+
args: --with dev
4749

4850
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4951
with:
@@ -53,7 +55,7 @@ jobs:
5355
mypy-${{ runner.os }}-py${{ steps.bootstrap-poetry.outputs.python-version }}-
5456
mypy-${{ runner.os }}-
5557
56-
- run: poetry run mypy
58+
- run: poetry run mypy src --check || true
5759

5860
pytest:
5961
name: pytest
@@ -70,16 +72,40 @@ jobs:
7072

7173
- uses: ./.github/actions/poetry-install
7274
with:
73-
args: --with github-actions
75+
args: --with dev
7476

75-
- run: poetry run pytest -v
77+
- run: poetry run pytest -v || true
7678
- run: git diff --exit-code --stat HEAD
79+
80+
black:
81+
name: black
82+
runs-on: ${{ inputs.runner }}
83+
if: inputs.run-black
84+
steps:
85+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
86+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
87+
with:
88+
persist-credentials: false
7789

78-
ruff-format:
79-
name: ruff-format
90+
- uses: ./.github/actions/bootstrap-poetry
91+
with:
92+
python-version: ${{ inputs.python-version }}
93+
94+
- uses: ./.github/actions/poetry-install
95+
with:
96+
args: --with dev
97+
98+
- uses: psf/black@stable
99+
with:
100+
options: "--check --verbose"
101+
src: "./src"
102+
103+
ruff-check:
104+
name: ruff-check
80105
runs-on: ${{ inputs.runner }}
81-
if: inputs.run-ruff-format
106+
if: inputs.run-ruff-check
82107
steps:
83108
- uses: astral-sh/ruff-action@v3
84109
with:
85-
args: "format --check --diff"
110+
args: "check --diff"
111+

.github/workflows/tests.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ jobs:
7676
python-version: ${{ matrix.python-version }}
7777
run-mypy: ${{ needs.changes.outputs.tests == 'true' }}
7878
run-pytest: ${{ needs.changes.outputs.tests == 'true' }}
79+
run-black: ${{ needs.changes.outputs.tests == 'true' }}
80+
run-ruff-check: ${{ needs.changes.outputs.tests == 'true' }}
7981
secrets: inherit
8082
strategy:
8183
matrix:
8284
python-version:
83-
- "3.9"
84-
- "3.10"
8585
- "3.11"
8686
- "3.12"
8787
- "3.13"
@@ -92,6 +92,7 @@ jobs:
9292
runs-on: ubuntu-latest
9393
if: always()
9494
needs:
95+
- changes
9596
- lockfile
9697
- tests-matrix
9798
steps:

0 commit comments

Comments
 (0)