@@ -11,10 +11,13 @@ jobs:
1111 strategy :
1212 matrix :
1313 os : [ubuntu-latest, windows-latest]
14- python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
14+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.10", "pypy3.11" ]
1515 # Fail-fast skews the pass/fail ratio and seems to make pytest produce
1616 # incomplete JUnit XML results.
1717 fail-fast : false
18+ env :
19+ install-opts : ${{ !startsWith(matrix.python-version, 'pypy') && '--extras grpc' || '' }}
20+ pytest-opts : ${{ startsWith(matrix.python-version, 'pypy') && '-k "not grpc"' || '' }}
1821 steps :
1922 - name : Check out repo
2023 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -25,36 +28,48 @@ jobs:
2528 python-version : ${{ matrix.python-version }}
2629 - name : Set up Poetry
2730 uses : ni/python-actions/setup-poetry@5286c12d65d90b2ea738bd57d452dc4366497581 # v0.4.1
28- - name : Restore cached virtualenv (main only)
29- uses : actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
30- id : restore-nidaqmx-main-only
31- with :
32- path : .venv
33- key : nidaqmx-main-only-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
34- - name : Install main package dependencies
35- run : |
36- python -m pip install --upgrade pip
37- poetry install --only main
38- - name : check installdriver subcommand can be invoked
39- run : poetry run nidaqmx installdriver --help
40- - name : Save cached virtualenv (main only)
41- uses : actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
42- if : steps.restore-nidaqmx-main-only.outputs.cache-hit != 'true'
43- with :
44- path : .venv
45- key : ${{ steps.restore-nidaqmx-main-only.outputs.cache-primary-key }}
46- - name : Cache virtualenv (with dev dependencies)
31+ - name : Cache virtualenv (with test dependencies)
4732 uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4833 with :
4934 path : .venv
50- key : nidaqmx-with-dev -${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
51- - name : Install dev dependencies
52- run : poetry install
35+ key : nidaqmx-with-test -${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
36+ - name : Install test dependencies
37+ run : poetry install --only main,test ${{ env.install-opts }}
5338 - name : Run unit tests
54- run : poetry run pytest -v --cov=generated/nidaqmx --junitxml=test_results/unit-${{ matrix.os }}-py${{ matrix.python-version }}.xml tests/unit
39+ run : poetry run pytest -v --cov=generated/nidaqmx --junitxml=test_results/unit-${{ matrix.os }}-py${{ matrix.python-version }}.xml tests/unit ${{ env.pytest-opts }}
5540 - name : Upload test results
5641 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5742 with :
5843 name : test_results_unit_${{ matrix.os }}_py${{ matrix.python-version }}
5944 path : test_results/*.xml
60- if : always()
45+ if : always()
46+ test_installdriver :
47+ name : Test installdriver
48+ runs-on :
49+ - ${{ matrix.os }}
50+ strategy :
51+ matrix :
52+ os : [ubuntu-latest, windows-latest]
53+ python-version : ["3.9", "3.13", "pypy3.11"]
54+ steps :
55+ - name : Check out repo
56+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
57+ - name : Set up Python ${{ matrix.python-version }}
58+ uses : ni/python-actions/setup-python@5286c12d65d90b2ea738bd57d452dc4366497581 # v0.4.1
59+ id : setup-python
60+ with :
61+ python-version : ${{ matrix.python-version }}
62+ - name : Set up Poetry
63+ uses : ni/python-actions/setup-poetry@5286c12d65d90b2ea738bd57d452dc4366497581 # v0.4.1
64+ - name : Cache virtualenv (main only)
65+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
66+ id : cache-nidaqmx-main-only
67+ with :
68+ path : .venv
69+ key : nidaqmx-main-only-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
70+ - name : Install main package dependencies
71+ run : |
72+ python -m pip install --upgrade pip
73+ poetry install --only main
74+ - name : check installdriver subcommand can be invoked
75+ run : poetry run nidaqmx installdriver --help
0 commit comments