Skip to content

Commit 5e86cc0

Browse files
committed
add windows and macos runs in CI #85 #86
1 parent c60b748 commit 5e86cc0

File tree

2 files changed

+129
-10
lines changed

2 files changed

+129
-10
lines changed

.github/workflows/test.yml

Lines changed: 127 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ jobs:
142142
TEST_DATABASE_VERSION: "sqlite"
143143
strategy:
144144
matrix:
145-
python-version: [ '3.9', '3.12']
145+
python-version: [ '3.9', '3.13']
146146
django-version:
147147
- '3.2' # LTS April 2024
148148
- '4.2' # LTS April 2026
149149
- '5.1' # December 2025
150150
exclude:
151151
- python-version: '3.9'
152152
django-version: '5.1'
153-
- python-version: '3.12'
153+
- python-version: '3.13'
154154
django-version: '3.2'
155155

156156
steps:
@@ -196,15 +196,15 @@ jobs:
196196
actions: write
197197
strategy:
198198
matrix:
199-
python-version: [ '3.9', '3.12']
199+
python-version: [ '3.9', '3.13']
200200
mysql-version: ['5.7', 'latest']
201201
mysqlclient-version: ['1.4.3', '']
202202
django-version:
203203
- '3.2' # LTS April 2024
204204
- '4.2' # LTS April 2026
205205
- '5.1' # December 2025
206206
exclude:
207-
- python-version: '3.12'
207+
- python-version: '3.13'
208208
django-version: '3.2'
209209
- python-version: '3.9'
210210
django-version: '5.1'
@@ -301,7 +301,7 @@ jobs:
301301

302302
strategy:
303303
matrix:
304-
python-version: [ '3.9', '3.12']
304+
python-version: [ '3.9', '3.13']
305305
mysqlclient-version: ['1.4.3', '']
306306
mariadb-version: ['10.2', 'latest']
307307
mariadb-healthcheck: ["mysqladmin ping", "healthcheck.sh --connect --innodb_initialized"]
@@ -310,7 +310,7 @@ jobs:
310310
- '4.2' # LTS April 2026
311311
- '5.1' # December 2025
312312
exclude:
313-
- python-version: '3.12'
313+
- python-version: '3.13'
314314
django-version: '3.2'
315315
- python-version: '3.9'
316316
django-version: '5.1'
@@ -492,10 +492,129 @@ jobs:
492492
with:
493493
name: ${{ env.COVERAGE_FILE }}
494494
path: ${{ env.COVERAGE_FILE }}
495-
495+
496+
497+
windows:
498+
runs-on: windows-latest
499+
permissions:
500+
actions: write
501+
env:
502+
RDBMS: sqlite
503+
COVERAGE_FILE: windows-py${{ matrix.python-version }}-dj${{ matrix.django-version }}-sqlite.coverage
504+
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
505+
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
506+
TEST_DATABASE_VERSION: "sqlite"
507+
strategy:
508+
matrix:
509+
python-version: [ '3.9', '3.13']
510+
django-version:
511+
- '3.2' # LTS April 2024
512+
- '4.2' # LTS April 2026
513+
- '5.1' # December 2025
514+
exclude:
515+
- python-version: '3.9'
516+
django-version: '5.1'
517+
- python-version: '3.13'
518+
django-version: '3.2'
519+
520+
steps:
521+
- uses: actions/checkout@v4
522+
- name: Set up Python ${{ matrix.python-version }}
523+
uses: actions/setup-python@v5
524+
id: sp
525+
with:
526+
python-version: ${{ matrix.python-version }}
527+
528+
- name: Setup Just
529+
uses: extractions/setup-just@v2
530+
- name: Install Release Dependencies
531+
run: |
532+
just init ${{ steps.sp.outputs.python-path }}
533+
just install
534+
just test-lock Django~=${{ matrix.django-version }}.0
535+
- name: install-vim-windows
536+
if: ${{ github.event.inputs.debug == 'true' }}
537+
uses: rhysd/action-setup-vim@v1
538+
- name: Setup tmate session
539+
if: ${{ github.event.inputs.debug == 'true' }}
540+
uses: mxschmitt/[email protected]
541+
with:
542+
detached: true
543+
timeout-minutes: 60
544+
- name: Run Unit Tests
545+
run: |
546+
just run ./manage.py makemigrations
547+
just test ./tests/verify_environment.py
548+
just test-all
549+
- name: Store coverage files
550+
uses: actions/upload-artifact@v4
551+
with:
552+
name: ${{ env.COVERAGE_FILE }}
553+
path: ${{ env.COVERAGE_FILE }}
554+
555+
556+
macos:
557+
runs-on: macos-latest
558+
permissions:
559+
actions: write
560+
env:
561+
RDBMS: sqlite
562+
COVERAGE_FILE: macos-py${{ matrix.python-version }}-dj${{ matrix.django-version }}-sqlite.coverage
563+
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
564+
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
565+
TEST_DATABASE_VERSION: "sqlite"
566+
strategy:
567+
matrix:
568+
python-version: [ '3.9', '3.13']
569+
django-version:
570+
- '3.2' # LTS April 2024
571+
- '4.2' # LTS April 2026
572+
- '5.1' # December 2025
573+
exclude:
574+
- python-version: '3.9'
575+
django-version: '5.1'
576+
- python-version: '3.13'
577+
django-version: '3.2'
578+
579+
steps:
580+
- uses: actions/checkout@v4
581+
- name: Set up Python ${{ matrix.python-version }}
582+
uses: actions/setup-python@v5
583+
id: sp
584+
with:
585+
python-version: ${{ matrix.python-version }}
586+
587+
- name: Setup Just
588+
uses: extractions/setup-just@v2
589+
- name: Install Release Dependencies
590+
run: |
591+
just init ${{ steps.sp.outputs.python-path }}
592+
just install
593+
just test-lock Django~=${{ matrix.django-version }}.0
594+
- name: install-emacs-macos
595+
if: ${{ github.event.inputs.debug == 'true' }}
596+
run: |
597+
brew install emacs
598+
- name: Setup tmate session
599+
if: ${{ github.event.inputs.debug == 'true' }}
600+
uses: mxschmitt/[email protected]
601+
with:
602+
detached: true
603+
timeout-minutes: 60
604+
- name: Run Unit Tests
605+
run: |
606+
just run ./manage.py makemigrations
607+
just test ./tests/verify_environment.py
608+
just test-all
609+
- name: Store coverage files
610+
uses: actions/upload-artifact@v4
611+
with:
612+
name: ${{ env.COVERAGE_FILE }}
613+
path: ${{ env.COVERAGE_FILE }}
614+
496615

497616
coverage-combine:
498-
needs: [postgres, sqlite, mysql, mariadb, oracle]
617+
needs: [postgres, sqlite, mysql, mariadb, oracle, windows, macos]
499618
runs-on: ubuntu-latest
500619

501620
steps:

django_enum/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434

3535

3636
class _ChoicesCallable(Protocol):
37-
def __call__(self) -> _FieldChoices: ...
37+
def __call__(self) -> _FieldChoices: ... # pragma: no cover
3838

3939

4040
_ChoicesParameter = Union[_FieldChoices, _ChoicesCallable]
4141

4242

4343
class _CoerceCallable(Protocol):
44-
def __call__(self, value: Any, /) -> Any: ...
44+
def __call__(self, value: Any, /) -> Any: ... # pragma: no cover
4545

4646

4747
class _Unspecified:

0 commit comments

Comments
 (0)