1- # This workflow uses actions that are not certified by GitHub.
2- # They are provided by a third-party and are governed by
3- # separate terms of service, privacy policy, and support
4- # documentation.
5- name : D
1+ name : Python CI
62
73on :
84 push :
@@ -14,19 +10,28 @@ permissions:
1410 contents : read
1511
1612jobs :
17- build :
18-
13+ test :
1914 runs-on : ubuntu-latest
2015
16+ strategy :
17+ matrix :
18+ python-version : ["3.9", "3.10", "3.11"]
19+
2120 steps :
2221 - uses : actions/checkout@v4
23- - uses : dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7
2422
25- - name : ' Build & Test'
23+ - name : Set up Python ${{ matrix.python-version }}
24+ uses : actions/setup-python@v4
25+ with :
26+ python-version : ${{ matrix.python-version }}
27+
28+ - name : Install dependencies
29+ run : |
30+ python -m pip install --upgrade pip
31+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32+ if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
33+ pip install pytest pytest-cov
34+
35+ - name : Run tests
2636 run : |
27- # Build the project, with its main file included, without unittests
28- dub build --compiler=$DC
29- # Build and run tests, as defined by `unittest` configuration
30- # In this mode, `mainSourceFile` is excluded and `version (unittest)` are included
31- # See https://dub.pm/package-format-json.html#configurations
32- dub test --compiler=$DC
37+ pytest tests/ -v --cov=. --cov-report=term-missing
0 commit comments