Skip to content

Commit e6cda8f

Browse files
author
CoderDeltaLAN
committed
ci: add Windows as optional (continue-on-error) and keep Linux required
1 parent 2640e04 commit e6cda8f

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches: [main]
55
pull_request:
66
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
7+
workflow_dispatch:
78

89
permissions:
910
contents: read
@@ -13,13 +14,17 @@ concurrency:
1314
cancel-in-progress: true
1415

1516
jobs:
16-
python:
17-
if: ${{ (github.event_name == 'push' && startsWith(github.ref,'refs/heads/main')) || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name,'ready')) }}
17+
linux:
18+
name: linux (py=${{ matrix.python-version }})
1819
runs-on: ubuntu-latest
1920
strategy:
2021
fail-fast: false
2122
matrix:
22-
python-version: ['3.11','3.12']
23+
python-version:
24+
- "3.11"
25+
- "3.12"
26+
env:
27+
PYTHONPATH: src
2328
steps:
2429
- uses: actions/checkout@v4
2530
- uses: actions/setup-python@v5
@@ -31,3 +36,21 @@ jobs:
3136
- run: black --check .
3237
- run: pytest -q
3338
- run: mypy .
39+
40+
windows_optional:
41+
name: windows (optional)
42+
runs-on: windows-latest
43+
continue-on-error: true
44+
env:
45+
PYTHONPATH: src
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-python@v5
49+
with:
50+
python-version: "3.12"
51+
- run: python -m pip install -U pip
52+
- run: pip install ruff black pytest mypy
53+
- run: ruff check .
54+
- run: black --check .
55+
- run: pytest -q
56+
- run: mypy .

0 commit comments

Comments
 (0)