From 470ab084dbbe17e3955abd6a4c56434ffc849594 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Fri, 21 Aug 2026 14:06:08 -0500 Subject: [PATCH 01/15] Replace travis-ci --- .github/workflows/unit_tests.yml | 99 +++++++++++++++ .travis.yml | 50 -------- README.rst | 4 +- build/Makefile | 2 +- generated/nidcpower/README.rst | 4 +- generated/nidigital/README.rst | 4 +- generated/nidmm/README.rst | 4 +- generated/nifgen/README.rst | 4 +- generated/nimodinst/README.rst | 4 +- generated/nirfsa/README.rst | 4 +- generated/nirfsg/README.rst | 4 +- generated/niscope/README.rst | 4 +- generated/nise/README.rst | 4 +- generated/niswitch/README.rst | 4 +- generated/nitclk/README.rst | 4 +- tox-travis.ini | 207 ------------------------------- tox.ini | 7 +- 17 files changed, 126 insertions(+), 287 deletions(-) create mode 100644 .github/workflows/unit_tests.yml delete mode 100644 .travis.yml delete mode 100644 tox-travis.ini diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml new file mode 100644 index 0000000000..25bf886075 --- /dev/null +++ b/.github/workflows/unit_tests.yml @@ -0,0 +1,99 @@ +name: Run unit tests + +on: + push: + branches: + - master + - releases/** + pull_request: + branches: + - master + - releases/** + workflow_call: + workflow_dispatch: + +permissions: {} + +jobs: + run_unit_tests: + name: Run unit tests (${{ matrix.os }}, Python ${{ matrix.python-version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + # Run the code-generation Python version first, as Travis CI did. + python-version: ['3.12', '3.10', '3.11', '3.13', '3.14'] + steps: + - name: Check out repo + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + submodules: recursive + - name: Set up Python + uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1 + id: setup-python + with: + python-version: ${{ matrix.python-version }} + - name: Install tox + run: python -m pip install --upgrade tox + - name: Ensure codegen is up to date + if: matrix.python-version != '3.13' && matrix.python-version != '3.14' + run: python tools/ensure_codegen_up_to_date.py + - name: Cache tox environments + uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 + with: + path: .tox + key: nimi-python-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tox.ini') }} + - name: Run tox + run: >- + mkdir -p test_results && tox -c tox.ini -- + --junitxml=test_results/unit-tests-${{ runner.os }}-py${{ matrix.python-version }}.xml + - name: Upload codegen unit-test coverage + uses: codecov/codecov-action@v3 + with: + # See ../PUBLIC_CODECOV_TOKEN_README.md + token: 4c58f03d-b74c-489a-889a-ab0a77b7809f + flags: codegenunittests + files: ./codegen.xml + - name: Upload nifake unit-test coverage + uses: codecov/codecov-action@v3 + with: + token: 4c58f03d-b74c-489a-889a-ab0a77b7809f + flags: nifakeunittests + files: ./nifakeunittest.xml + - name: Upload nidcpower unit-test coverage + uses: codecov/codecov-action@v3 + with: + token: 4c58f03d-b74c-489a-889a-ab0a77b7809f + flags: nidcpowerunittests + files: ./nidcpowerunittest.xml + - name: Upload nidigital unit-test coverage + uses: codecov/codecov-action@v3 + with: + token: 4c58f03d-b74c-489a-889a-ab0a77b7809f + flags: nidigitalunittests + files: ./nidigitalunittest.xml + - name: Upload nimodinst unit-test coverage + uses: codecov/codecov-action@v3 + with: + token: 4c58f03d-b74c-489a-889a-ab0a77b7809f + flags: nimodinstunittests + files: ./nimodinstunittest.xml + - name: Upload niscope unit-test coverage + uses: codecov/codecov-action@v3 + with: + token: 4c58f03d-b74c-489a-889a-ab0a77b7809f + flags: niscopeunittests + files: ./niscopeunittest.xml + - name: Upload nitclk unit-test coverage + uses: codecov/codecov-action@v3 + with: + token: 4c58f03d-b74c-489a-889a-ab0a77b7809f + flags: nitclkunittests + files: ./nitclkunittest.xml + - name: Upload test results + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: test_results_unit_${{ runner.os }}_py${{ matrix.python-version }} + path: test_results/*.xml + if: always() \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0586ba643e..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -group: travis_latest -language: python -dist: focal -git: - submodules: false -matrix: - include: - # Historically, we've run tests on the latest supported version of Python first. - # For now, we're running Python 3.12 first, because it's the version currently used for codegen. - # This is where additional tests are run so we give it more time. - # When the version used for codegen changes, the version that runs first should change to match. - - python: "3.12" - - python: "3.10" - - python: "3.11" - - python: "3.13" - - python: "3.14" - -install: - - git submodule update --init --recursive --progress - - travis_retry sudo apt-get -y install python3-pip - - travis_retry pip install --upgrade pip - # tox 4.0 broke plugin compatibility - # TODO(ni-jfitzger): When tox-travis has a release compatible with tox>=4.0, remove the tox version specifier (Tracked on GitHub by #1876) - - travis_retry pip install --upgrade tox==3.* tox-travis - -before_script: - # Python 3.13 is only supported by grpcio-tools >= 1.67.0, a later version than what we use in the tox.ini - # Python 3.14 is only supported by grpcio-tools >= 1.75.1, a later version than what we use in the tox.ini - - if [[ "$TRAVIS_PYTHON_VERSION" != "3.13" && "$TRAVIS_PYTHON_VERSION" != "3.14" ]]; then python tools/ensure_codegen_up_to_date.py; fi - -script: - - tox -c tox-travis.ini - -after_success: - # Install and verify codecov tool - - travis_retry curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import - - travis_retry curl -Os https://uploader.codecov.io/latest/linux/codecov # download codecov tool - - travis_retry curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - - travis_retry curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - - travis_retry gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - - travis_retry shasum -a 256 -c codecov.SHA256SUM - - travis_retry chmod +x codecov - # upload coverage - - travis_retry ./codecov --flags codegenunittests --file codegen.xml - - travis_retry ./codecov --flags nifakeunittests --file nifakeunittest.xml - - travis_retry ./codecov --flags nidcpowerunittests --file nidcpowerunittest.xml - - travis_retry ./codecov --flags nidigitalunittests --file nidigitalunittest.xml - - travis_retry ./codecov --flags nimodinstunittests --file nimodinstunittest.xml - - travis_retry ./codecov --flags niscopeunittests --file niscopeunittest.xml - - travis_retry ./codecov --flags nitclkunittests --file nitclkunittest.xml diff --git a/README.rst b/README.rst index fc3c1b87b5..7532468739 100644 --- a/README.rst +++ b/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/build/Makefile b/build/Makefile index 7306b2bb71..0ff8e645a0 100644 --- a/build/Makefile +++ b/build/Makefile @@ -69,7 +69,7 @@ installers: $(foreach d,$(ALL_DRIVERS), $(d)_installers) SUPPRESS_ERROR_OUTPUT ?= 2> /dev/null -# We need to ensure generated exists for Travis CI builds +# Keep the generated directory available for CI builds clean: start @echo 'Cleaning...' -$(_hide_cmds)rm -Rf $(GENERATED_DIR)/ $(SUPPRESS_ERROR_OUTPUT) ||: diff --git a/generated/nidcpower/README.rst b/generated/nidcpower/README.rst index 896ea83972..19cedce509 100644 --- a/generated/nidcpower/README.rst +++ b/generated/nidcpower/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nidigital/README.rst b/generated/nidigital/README.rst index 9ff6163efb..4117e3d9a4 100644 --- a/generated/nidigital/README.rst +++ b/generated/nidigital/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nidmm/README.rst b/generated/nidmm/README.rst index cc8a612d0f..ada5603266 100644 --- a/generated/nidmm/README.rst +++ b/generated/nidmm/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nifgen/README.rst b/generated/nifgen/README.rst index 17c6fe1fb8..d0356fbe27 100644 --- a/generated/nifgen/README.rst +++ b/generated/nifgen/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nimodinst/README.rst b/generated/nimodinst/README.rst index ee0fdff0c3..29fe9a0919 100644 --- a/generated/nimodinst/README.rst +++ b/generated/nimodinst/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nirfsa/README.rst b/generated/nirfsa/README.rst index 454d1e22b5..3e4a64d7e9 100644 --- a/generated/nirfsa/README.rst +++ b/generated/nirfsa/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nirfsg/README.rst b/generated/nirfsg/README.rst index 335c411203..42bdf8820e 100644 --- a/generated/nirfsg/README.rst +++ b/generated/nirfsg/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/niscope/README.rst b/generated/niscope/README.rst index 4f23d6e16b..1404aca278 100644 --- a/generated/niscope/README.rst +++ b/generated/niscope/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nise/README.rst b/generated/nise/README.rst index 17276b87f7..0d6d604dea 100644 --- a/generated/nise/README.rst +++ b/generated/nise/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/niswitch/README.rst b/generated/niswitch/README.rst index ca2a3f0535..927e02c7b3 100644 --- a/generated/niswitch/README.rst +++ b/generated/niswitch/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nitclk/README.rst b/generated/nitclk/README.rst index 960de3b140..87ba6822ce 100644 --- a/generated/nitclk/README.rst +++ b/generated/nitclk/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/tox-travis.ini b/tox-travis.ini deleted file mode 100644 index c87f353af6..0000000000 --- a/tox-travis.ini +++ /dev/null @@ -1,207 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. -[tox] -# tox.ini and tox-travis.ini are copies of the same content with different envlist commented out -# tox-travis.ini will have pyXX-clean and all pyXX-installers in the default envlist, while the developer tox.ini -# does not have clean and only has one pyXX-installers -# Historically we've used the latest Python for environments that we only list one Python for. For now, we're using Python 3.12 -# to avoid updating our pb2 files, which could possibly cause incompatibilities with other NI Python packages. -# When other NI Python packages bump the version that they use for generating pb2 files, we can bump this Python version to match. -# We may also bump it sooner, if we agree with team members who own other NI Python packages that it's okay to do so. -# At the latest, we'll bump it when we drop support for Python 3.12. -# Uncomment this line for tox.ini -# envlist = py312-build_test,py312-codegen,py312-installers,py{310,311,312,313,314}-test,py312-flake8,py312-docs,py312-pkg -# Uncomment this line for tox-travis.ini -envlist = py312-clean,py312-build_test,py312-codegen,py{310,311,312,313,314}-installers,py{310,311,312,313,314}-test,py312-flake8,py312-docs,py312-pkg -skip_missing_interpreters=True -ignore_basepython_conflict=True -skipsdist = true -toxworkdir = .tox/{env:BITNESS:64} - -[testenv] -description = - test: Run tests - build_test: Test the build scripts - clean: Clean code generated files - codegen: Run code generation step - installers: Build the installers (wheels and sdists) - flake8: Run static analysis - docs: Generate documentation - pkg: Verify the package - -changedir = - build_test: . - test: . - codegen: . - installers: . - clean: . - docs: docs - flake8: . - pkg: . - -commands = - build_test: python --version - build_test: python -c "import platform; print(platform.architecture())" - build_test: python -m pip install --disable-pip-version-check --upgrade pip - build_test: python -m pip list - # doctest validation of code docstrings - build_test: coverage run --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest --pyargs build.helper - # actual unit tests - build_test: coverage run --append --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest build/unit_tests {posargs} -s - # Display the report on console - build_test: coverage report - # Create the report to upload - build_test: coverage xml -o codegen.xml - # Save the report - build_test: coverage html --directory=generated/htmlcov/unit_tests/codegen - build_test: flake8 --config=./tox.ini --per-file-ignores=build/unit_tests/*.py:F403,F405 build/ - test: python --version - test: python -c "import platform; print(platform.architecture())" - test: python -m pip install --disable-pip-version-check --upgrade pip - test: python tools/install_local_wheel.py --driver nitclk - test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nifake -m pytest generated/nifake/nifake {posargs} -s - test: coverage report - test: coverage xml -o nifakeunittest.xml - test: coverage html --directory=generated/htmlcov/unit_tests/nifake - test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nidcpower -m pytest generated/nidcpower/nidcpower {posargs} -s - test: coverage report - test: coverage xml -o nidcpowerunittest.xml - test: coverage html --directory=generated/htmlcov/unit_tests/nidcpower - test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nidigital -m pytest generated/nidigital/nidigital {posargs} -s - test: coverage report - test: coverage xml -o nidigitalunittest.xml - test: coverage html --directory=generated/htmlcov/unit_tests/nidigital - test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nimodinst -m pytest generated/nimodinst/nimodinst {posargs} -s - test: coverage report - test: coverage xml -o nimodinstunittest.xml - test: coverage html --directory=generated/htmlcov/unit_tests/nimodinst - test: coverage run --rcfile=tools/coverage_unit_tests.rc --source niscope -m pytest generated/niscope/niscope {posargs} -s - test: coverage report - test: coverage xml -o niscopeunittest.xml - test: coverage html --directory=generated/htmlcov/unit_tests/niscope - test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nirfsa -m pytest generated/nirfsa/nirfsa {posargs} -s - test: coverage report - test: coverage xml -o nirfsaunittest.xml - test: coverage html --directory=generated/htmlcov/unit_tests/nirfsa - test: coverage run --rcfile=tools/coverage_unit_tests.rc --source nitclk -m pytest generated/nitclk/nitclk {posargs} -s - test: coverage report - test: coverage xml -o nitclkunittest.xml - test: coverage html --directory=generated/htmlcov/unit_tests/nitclk - clean: python --version - clean: python -c "import platform; print(platform.architecture())" - clean: make clean {posargs} - codegen: python --version - codegen: python -c "import platform; print(platform.architecture())" - codegen: python -m pip install --disable-pip-version-check --upgrade pip - codegen: make {posargs} - installers: python --version - installers: python -c "import platform; print(platform.architecture())" - installers: python -m pip install --disable-pip-version-check --upgrade pip - installers: make installers {posargs} - flake8: python --version - flake8: python -c "import platform; print(platform.architecture())" - flake8: python -m pip install --disable-pip-version-check --upgrade pip - flake8: flake8 --config=./tox.ini generated/ - flake8: flake8 --config=./tox.ini tools/ - flake8: flake8 --config=./tox.ini src/nidcpower/system_tests/ src/nidcpower/examples/ - flake8: flake8 --config=./tox.ini src/nidigital/system_tests/ src/nidigital/examples/ - flake8: flake8 --config=./tox.ini src/nidmm/system_tests/ src/nidmm/examples/ - flake8: flake8 --config=./tox.ini src/nifgen/system_tests/ src/nifgen/examples/ - flake8: flake8 --config=./tox.ini src/nimodinst/system_tests/ src/nimodinst/examples/ - flake8: flake8 --config=./tox.ini src/nirfsa/system_tests/ src/nirfsa/examples/ - flake8: flake8 --config=./tox.ini src/nirfsg/system_tests/ src/nirfsg/examples/ - flake8: flake8 --config=./tox.ini src/niscope/system_tests/ src/niscope/examples/ - flake8: flake8 --config=./tox.ini src/nise/system_tests/ src/nise/examples/ - flake8: flake8 --config=./tox.ini src/niswitch/system_tests/ src/niswitch/examples/ - flake8: flake8 --config=./tox.ini src/nitclk/system_tests/ src/nitclk/examples/ - docs: python --version - docs: python -c "import platform; print(platform.architecture())" - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidcpower ../generated/docs/nidcpower/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidigital ../generated/docs/nidigital/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidmm ../generated/docs/nidmm/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nifgen ../generated/docs/nifgen/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nimodinst ../generated/docs/nimodinst/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nirfsa ../generated/docs/nirfsa/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nirfsg ../generated/docs/nirfsg/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niscope ../generated/docs/niscope/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nise ../generated/docs/nise/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niswitch ../generated/docs/niswitch/html {posargs} - docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nitclk ../generated/docs/nitclk/html {posargs} - pkg: python --version - pkg: python -c "import platform; print(platform.architecture())" - pkg: python -m twine --version - pkg: python -m twine check generated/nifake/dist/* - pkg: python -m twine check generated/nidcpower/dist/* - pkg: python -m twine check generated/nidigital/dist/* - pkg: python -m twine check generated/nidmm/dist/* - pkg: python -m twine check generated/nifgen/dist/* - pkg: python -m twine check generated/nirfsa/dist/* - pkg: python -m twine check generated/nirfsg/dist/* - pkg: python -m twine check generated/niscope/dist/* - pkg: python -m twine check generated/nise/dist/* - pkg: python -m twine check generated/niswitch/dist/* - # pkg: check-manifest --ignore tox.ini,tests*,.github,.github/*,CONTRIBUTING.rst,docs,docs/* - -deps = - test: pytest - test: pytest-timeout - test: coverage - test: mako - test: numpy - test: hightime - test: grpcio == 1.75.1 # Compatible with Python 3.14; should be backwards compatible with grpcio-tools 1.59.0 - test: protobuf == 5.27.2 # Compatible with Python 3.14; should be backwards compatible with grpcio-tools 1.59.0 - test: ni.grpcdevice.v1.proto >= 1.0.0 # Provides session_pb2 package at runtime since we no longer generate it per-driver - build_test: pytest - build_test: coverage - build_test: mako - build_test: hacking - build_test: pep8-naming - codegen: mako - codegen: packaging - codegen: setuptools < 82 # grpcio-tools 1.59.0 needs pkg_resources which was removed in setuptools v82 - codegen: grpcio-tools == 1.59.0 # First version to support Python 3.12 - installers: build - flake8: hacking - flake8: pep8-naming - docs: sphinx - docs: sphinx-rtd-theme - pkg: check-manifest - pkg: docutils - pkg: pygments - pkg: twine - -depends = - codegen: py312-clean - installers: py312-codegen - flake8: py312-codegen - docs: py312-codegen - test: py312-installers - pkg: py312-installers - -allowlist_externals = - build_test: mv - test: mv - codegen: make - installers: make - clean: make - -[flake8] -show_source = true -# We recommend setting your editor's visual guide to 79 but allow overflow to -# 160 for readability in certain cases due to generated code -# max_line_length = 160 -exclude = build,docs,.tox,__pycache__,processed_metadata,.eggs,*_pb2*.py,third_party -# H903: Windows style line endings not allowed in code -# E501: Line length -# W391: Blank line at end of file -ignore = H903,E501,W391 - -[pytest] -addopts = --verbose --doctest-modules --ignore=setup.py -norecursedirs = system_tests examples .* build dist CVS _darcs {arch} *.egg venv -junit_suite_name = nimi-python -python_files = *.py -junit_family = xunit1 \ No newline at end of file diff --git a/tox.ini b/tox.ini index bc62eac58c..fb9f1d6afb 100644 --- a/tox.ini +++ b/tox.ini @@ -3,9 +3,8 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. [tox] -# tox.ini and tox-travis.ini are copies of the same content with different envlist commented out -# tox-travis.ini will have pyXX-clean and all pyXX-installers in the default envlist, while the developer tox.ini -# does not have clean and only has one pyXX-installers +# This configuration is used by both developers and GitHub Actions. +# The GitHub Actions workflow selects the test environment for each Python version. # Historically we've used the latest Python for environments that we only list one Python for. For now, we're using Python 3.12 # to avoid updating our pb2 files, which could possibly cause incompatibilities with other NI Python packages. # When other NI Python packages bump the version that they use for generating pb2 files, we can bump this Python version to match. @@ -13,8 +12,6 @@ # At the latest, we'll bump it when we drop support for Python 3.12. # Uncomment this line for tox.ini envlist = py312-build_test,py312-codegen,py312-installers,py{310,311,312,313,314}-test,py312-flake8,py312-docs,py312-pkg -# Uncomment this line for tox-travis.ini -# envlist = py312-clean,py312-build_test,py312-codegen,py{310,311,312,313,314}-installers,py{310,311,312,313,314}-test,py312-flake8,py312-docs,py312-pkg skip_missing_interpreters=True ignore_basepython_conflict=True skipsdist = true From 03530889675765eac3f9f83ff68f4a22a70caf8d Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Fri, 21 Aug 2026 14:16:23 -0500 Subject: [PATCH 02/15] Update source for README.rst --- docs/_static/status_project.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_static/status_project.inc b/docs/_static/status_project.inc index 5f60d7c359..4078e51e5a 100644 --- a/docs/_static/status_project.inc +++ b/docs/_static/status_project.inc @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://api.travis-ci.com/ni/nimi-python.svg +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://travis-ci.org/ni/nimi-python + :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License From 3f1d8deae3b5856e40e20de17ac8908a6dcc3803 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Fri, 21 Aug 2026 14:27:54 -0500 Subject: [PATCH 03/15] Explicitly call individual tox steps to avoid running 3.12-only steps with other Python versions. --- .github/workflows/unit_tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 25bf886075..b7422c27c9 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -44,9 +44,14 @@ jobs: with: path: .tox key: nimi-python-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tox.ini') }} - - name: Run tox + - name: Build installers + run: tox -c tox.ini -e py${{ matrix.python-version }}-installers + - name: Run build and package checks + if: matrix.python-version == '3.12' + run: tox -c tox.ini -e py312-build_test,py312-flake8,py312-docs,py312-pkg + - name: Run unit tests run: >- - mkdir -p test_results && tox -c tox.ini -- + mkdir -p test_results && tox -c tox.ini -e py${{ matrix.python-version }}-test -- --junitxml=test_results/unit-tests-${{ runner.os }}-py${{ matrix.python-version }}.xml - name: Upload codegen unit-test coverage uses: codecov/codecov-action@v3 From 9c25d167b20757f6933f9c60fd07ade275d23fac Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Fri, 21 Aug 2026 14:31:11 -0500 Subject: [PATCH 04/15] Don't include a decimal in the Python version passed to tox --- .github/workflows/unit_tests.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index b7422c27c9..179f5d03cd 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -23,7 +23,17 @@ jobs: matrix: os: [ubuntu-latest] # Run the code-generation Python version first, as Travis CI did. - python-version: ['3.12', '3.10', '3.11', '3.13', '3.14'] + include: + - python-version: '3.12' + tox-version: '312' + - python-version: '3.10' + tox-version: '310' + - python-version: '3.11' + tox-version: '311' + - python-version: '3.13' + tox-version: '313' + - python-version: '3.14' + tox-version: '314' steps: - name: Check out repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -45,13 +55,13 @@ jobs: path: .tox key: nimi-python-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tox.ini') }} - name: Build installers - run: tox -c tox.ini -e py${{ matrix.python-version }}-installers + run: tox -c tox.ini -e py${{ matrix.tox-version }}-installers - name: Run build and package checks if: matrix.python-version == '3.12' run: tox -c tox.ini -e py312-build_test,py312-flake8,py312-docs,py312-pkg - name: Run unit tests run: >- - mkdir -p test_results && tox -c tox.ini -e py${{ matrix.python-version }}-test -- + mkdir -p test_results && tox -c tox.ini -e py${{ matrix.tox-version }}-test -- --junitxml=test_results/unit-tests-${{ runner.os }}-py${{ matrix.python-version }}.xml - name: Upload codegen unit-test coverage uses: codecov/codecov-action@v3 From c06c6217d3538d989079abe25ec7d67480967560 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Fri, 21 Aug 2026 14:40:16 -0500 Subject: [PATCH 05/15] Fix matrix issue --- .github/workflows/unit_tests.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 179f5d03cd..2fb85d9d94 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -21,18 +21,22 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] # Run the code-generation Python version first, as Travis CI did. include: - - python-version: '3.12' + - os: ubuntu-latest + python-version: '3.12' tox-version: '312' - - python-version: '3.10' + - os: ubuntu-latest + python-version: '3.10' tox-version: '310' - - python-version: '3.11' + - os: ubuntu-latest + python-version: '3.11' tox-version: '311' - - python-version: '3.13' + - os: ubuntu-latest + python-version: '3.13' tox-version: '313' - - python-version: '3.14' + - os: ubuntu-latest + python-version: '3.14' tox-version: '314' steps: - name: Check out repo From 1866cf9c1112e8daade61b953666588012763bcf Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 13:27:10 -0500 Subject: [PATCH 06/15] Split unit_tests into multiple workflows, based on the steps actually run and create a CI and PR workflow. --- .github/workflows/CI.yml | 26 ++++++++++++++++ .github/workflows/PR.yml | 20 +++++++++++++ .../workflows/ensure_codegen_up_to_date.yml | 30 +++++++++++++++++++ .github/workflows/run_build_checks.yml | 30 +++++++++++++++++++ .github/workflows/unit_tests.yml | 15 ---------- 5 files changed, 106 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/PR.yml create mode 100644 .github/workflows/ensure_codegen_up_to_date.yml create mode 100644 .github/workflows/run_build_checks.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000000..f0d472f2a6 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: + - master + - releases/** + workflow_call: + workflow_dispatch: + +permissions: {} + +jobs: + ensure_codegen_up_to_date: + name: Ensure codegen is up to date + uses: ./.github/workflows/ensure_codegen_up_to_date.yml + + run_unit_tests: + name: Run unit tests + needs: ensure_codegen_up_to_date + uses: ./.github/workflows/unit_tests.yml + + run_build_checks: + name: Run build checks + needs: ensure_codegen_up_to_date + uses: ./.github/workflows/run_build_checks.yml diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml new file mode 100644 index 0000000000..b99fadbc9b --- /dev/null +++ b/.github/workflows/PR.yml @@ -0,0 +1,20 @@ +name: PR + +on: + pull_request: + branches: + - master + - releases/** + workflow_call: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: {} + +jobs: + run_ci: + name: Run CI + uses: ./.github/workflows/CI.yml diff --git a/.github/workflows/ensure_codegen_up_to_date.yml b/.github/workflows/ensure_codegen_up_to_date.yml new file mode 100644 index 0000000000..dd9898a43f --- /dev/null +++ b/.github/workflows/ensure_codegen_up_to_date.yml @@ -0,0 +1,30 @@ +name: Ensure codegen is up to date + +on: + workflow_call: + +permissions: {} + +jobs: + ensure_codegen_up_to_date: + name: Ensure codegen is up to date + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + submodules: recursive + - name: Set up Python + uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1 + id: setup-python + with: + python-version: '3.12' + - name: Install tox + run: python -m pip install --upgrade tox + - name: Cache tox environments + uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 + with: + path: .tox + key: nimi-python-codegen-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tox.ini') }} + - name: Ensure codegen is up to date + run: python tools/ensure_codegen_up_to_date.py diff --git a/.github/workflows/run_build_checks.yml b/.github/workflows/run_build_checks.yml new file mode 100644 index 0000000000..93bb93cc5c --- /dev/null +++ b/.github/workflows/run_build_checks.yml @@ -0,0 +1,30 @@ +name: Run build checks + +on: + workflow_call: + +permissions: {} + +jobs: + run_build_checks: + name: Run build and package checks + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + submodules: recursive + - name: Set up Python + uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1 + id: setup-python + with: + python-version: '3.12' + - name: Install tox + run: python -m pip install --upgrade tox + - name: Cache tox environments + uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 + with: + path: .tox + key: nimi-python-build-checks-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tox.ini') }} + - name: Run build and package checks + run: tox -c tox.ini -e py312-build_test,py312-flake8,py312-docs,py312-pkg diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 2fb85d9d94..5e25c272d3 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -1,16 +1,7 @@ name: Run unit tests on: - push: - branches: - - master - - releases/** - pull_request: - branches: - - master - - releases/** workflow_call: - workflow_dispatch: permissions: {} @@ -50,9 +41,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install tox run: python -m pip install --upgrade tox - - name: Ensure codegen is up to date - if: matrix.python-version != '3.13' && matrix.python-version != '3.14' - run: python tools/ensure_codegen_up_to_date.py - name: Cache tox environments uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 with: @@ -60,9 +48,6 @@ jobs: key: nimi-python-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tox.ini') }} - name: Build installers run: tox -c tox.ini -e py${{ matrix.tox-version }}-installers - - name: Run build and package checks - if: matrix.python-version == '3.12' - run: tox -c tox.ini -e py312-build_test,py312-flake8,py312-docs,py312-pkg - name: Run unit tests run: >- mkdir -p test_results && tox -c tox.ini -e py${{ matrix.tox-version }}-test -- From a9eddcd7899c0360d0ba363f86f6e4b687c76cd3 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 13:29:21 -0500 Subject: [PATCH 07/15] Rename unit_tests workflow to run_unit_tests --- .github/workflows/CI.yml | 2 +- .github/workflows/{unit_tests.yml => run_unit_tests.yml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{unit_tests.yml => run_unit_tests.yml} (100%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f0d472f2a6..fd4d8cf599 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,7 +18,7 @@ jobs: run_unit_tests: name: Run unit tests needs: ensure_codegen_up_to_date - uses: ./.github/workflows/unit_tests.yml + uses: ./.github/workflows/run_unit_tests.yml run_build_checks: name: Run build checks diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/run_unit_tests.yml similarity index 100% rename from .github/workflows/unit_tests.yml rename to .github/workflows/run_unit_tests.yml From e3052a26c0a80291e78b99a97d7fc3f22770c1f8 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 13:35:05 -0500 Subject: [PATCH 08/15] Add step to build installers --- .github/workflows/run_build_checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run_build_checks.yml b/.github/workflows/run_build_checks.yml index 93bb93cc5c..46b29046d2 100644 --- a/.github/workflows/run_build_checks.yml +++ b/.github/workflows/run_build_checks.yml @@ -26,5 +26,7 @@ jobs: with: path: .tox key: nimi-python-build-checks-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('tox.ini') }} + - name: Build installers + run: tox -c tox.ini -e py312-installers - name: Run build and package checks run: tox -c tox.ini -e py312-build_test,py312-flake8,py312-docs,py312-pkg From e09e125ad3d0e822540ddaa14541ea317f40c6d3 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 14:30:03 -0500 Subject: [PATCH 09/15] Update badge reference to reflect workflow changes. --- README.rst | 4 ++-- docs/_static/status_project.inc | 4 ++-- generated/nidcpower/README.rst | 4 ++-- generated/nidigital/README.rst | 4 ++-- generated/nidmm/README.rst | 4 ++-- generated/nifgen/README.rst | 4 ++-- generated/nimodinst/README.rst | 4 ++-- generated/nirfsa/README.rst | 4 ++-- generated/nirfsg/README.rst | 4 ++-- generated/niscope/README.rst | 4 ++-- generated/nise/README.rst | 4 ++-- generated/niswitch/README.rst | 4 ++-- generated/nitclk/README.rst | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.rst b/README.rst index 7532468739..5665a7d67f 100644 --- a/README.rst +++ b/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/docs/_static/status_project.inc b/docs/_static/status_project.inc index 4078e51e5a..5beaf06946 100644 --- a/docs/_static/status_project.inc +++ b/docs/_static/status_project.inc @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nidcpower/README.rst b/generated/nidcpower/README.rst index 19cedce509..2ca8885321 100644 --- a/generated/nidcpower/README.rst +++ b/generated/nidcpower/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nidigital/README.rst b/generated/nidigital/README.rst index 4117e3d9a4..394fdf5fe5 100644 --- a/generated/nidigital/README.rst +++ b/generated/nidigital/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nidmm/README.rst b/generated/nidmm/README.rst index ada5603266..6c3f357535 100644 --- a/generated/nidmm/README.rst +++ b/generated/nidmm/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nifgen/README.rst b/generated/nifgen/README.rst index d0356fbe27..348ebb9485 100644 --- a/generated/nifgen/README.rst +++ b/generated/nifgen/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nimodinst/README.rst b/generated/nimodinst/README.rst index 29fe9a0919..62bfca4cfb 100644 --- a/generated/nimodinst/README.rst +++ b/generated/nimodinst/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nirfsa/README.rst b/generated/nirfsa/README.rst index 3e4a64d7e9..07d4bf114e 100644 --- a/generated/nirfsa/README.rst +++ b/generated/nirfsa/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nirfsg/README.rst b/generated/nirfsg/README.rst index 42bdf8820e..65a725a11d 100644 --- a/generated/nirfsg/README.rst +++ b/generated/nirfsg/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/niscope/README.rst b/generated/niscope/README.rst index 1404aca278..ee35cea500 100644 --- a/generated/niscope/README.rst +++ b/generated/niscope/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nise/README.rst b/generated/nise/README.rst index 0d6d604dea..29b1cd226e 100644 --- a/generated/nise/README.rst +++ b/generated/nise/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/niswitch/README.rst b/generated/niswitch/README.rst index 927e02c7b3..3d7e020f7d 100644 --- a/generated/niswitch/README.rst +++ b/generated/niswitch/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License diff --git a/generated/nitclk/README.rst b/generated/nitclk/README.rst index 87ba6822ce..34cd71914f 100644 --- a/generated/nitclk/README.rst +++ b/generated/nitclk/README.rst @@ -12,9 +12,9 @@ Info NI Modular Instrument driver APIs for Python. Author NI =========== ============================================================================================================================ -.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml/badge.svg?branch=master +.. |BuildStatus| image:: https://github.com/ni/nimi-python/actions/workflows/CI.yml/badge.svg?branch=master :alt: Build Status - master branch - :target: https://github.com/ni/nimi-python/actions/workflows/unit_tests.yml + :target: https://github.com/ni/nimi-python/actions/workflows/CI.yml .. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg :alt: MIT License From f98ea3af925c71000f6b2bdb7354c310a79dd35a Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 14:34:56 -0500 Subject: [PATCH 10/15] Eliminate references to Travis --- .github/workflows/PUBLIC_CODECOV_TOKEN_README.md | 2 +- .github/workflows/run_unit_tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PUBLIC_CODECOV_TOKEN_README.md b/.github/workflows/PUBLIC_CODECOV_TOKEN_README.md index f4a5fd211d..445e794720 100644 --- a/.github/workflows/PUBLIC_CODECOV_TOKEN_README.md +++ b/.github/workflows/PUBLIC_CODECOV_TOKEN_README.md @@ -5,7 +5,7 @@ of a coverage upload when using tokenless uploads. The underlying issue is rate- There are 2 possible fixes: 1. Pass the token, when uploading -2. Implement a retry on upload failure (we do this for travis-ci) +2. Implement a retry on upload failure # OKAY, BUT WHY AREN'T WE STORING THIS TOKEN IN A SECRET? According to GitHub: "With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository." diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml index 5e25c272d3..b39420502b 100644 --- a/.github/workflows/run_unit_tests.yml +++ b/.github/workflows/run_unit_tests.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - # Run the code-generation Python version first, as Travis CI did. + # Run the code-generation Python version first. include: - os: ubuntu-latest python-version: '3.12' From 0d425a7625aa72104bdc7ddaeb5c4cc3106cf342 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 14:41:34 -0500 Subject: [PATCH 11/15] Stop running Python 3.12 unit tests, first. There's no benefit. --- .github/workflows/run_unit_tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml index b39420502b..17aff9d04b 100644 --- a/.github/workflows/run_unit_tests.yml +++ b/.github/workflows/run_unit_tests.yml @@ -12,17 +12,16 @@ jobs: strategy: fail-fast: false matrix: - # Run the code-generation Python version first. include: - - os: ubuntu-latest - python-version: '3.12' - tox-version: '312' - os: ubuntu-latest python-version: '3.10' tox-version: '310' - os: ubuntu-latest python-version: '3.11' tox-version: '311' + - os: ubuntu-latest + python-version: '3.12' + tox-version: '312' - os: ubuntu-latest python-version: '3.13' tox-version: '313' From bab6bc7db6cb52d05f9052fddfadca19198a0562 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 14:44:37 -0500 Subject: [PATCH 12/15] List run_build_check before run_unit_tests. Has no impact on results and they're executed in parallel, I just like this order better. --- .github/workflows/CI.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fd4d8cf599..d521e9dd0b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,12 +15,12 @@ jobs: name: Ensure codegen is up to date uses: ./.github/workflows/ensure_codegen_up_to_date.yml - run_unit_tests: - name: Run unit tests - needs: ensure_codegen_up_to_date - uses: ./.github/workflows/run_unit_tests.yml - run_build_checks: name: Run build checks needs: ensure_codegen_up_to_date uses: ./.github/workflows/run_build_checks.yml + + run_unit_tests: + name: Run unit tests + needs: ensure_codegen_up_to_date + uses: ./.github/workflows/run_unit_tests.yml From e21c4585c3d541a8e1153efb314863dc0a655324 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 14:50:01 -0500 Subject: [PATCH 13/15] End run_unit_tests with a newline --- .github/workflows/run_unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml index 17aff9d04b..933ea0cc4f 100644 --- a/.github/workflows/run_unit_tests.yml +++ b/.github/workflows/run_unit_tests.yml @@ -99,4 +99,4 @@ jobs: with: name: test_results_unit_${{ runner.os }}_py${{ matrix.python-version }} path: test_results/*.xml - if: always() \ No newline at end of file + if: always() From 9b69eca6a8e41651848bed8d8c3e9758b1ec1f4b Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 15:20:40 -0500 Subject: [PATCH 14/15] Remove silly comment. --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index fb9f1d6afb..41333b29e9 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,6 @@ # When other NI Python packages bump the version that they use for generating pb2 files, we can bump this Python version to match. # We may also bump it sooner, if we agree with team members who own other NI Python packages that it's okay to do so. # At the latest, we'll bump it when we drop support for Python 3.12. -# Uncomment this line for tox.ini envlist = py312-build_test,py312-codegen,py312-installers,py{310,311,312,313,314}-test,py312-flake8,py312-docs,py312-pkg skip_missing_interpreters=True ignore_basepython_conflict=True From cdd03a28e4921fabeb0939d4a7e348246b0c61c9 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Sat, 22 Aug 2026 15:24:11 -0500 Subject: [PATCH 15/15] Drop releases/** branch triggering. We have no such branches. --- .github/workflows/CI.yml | 1 - .github/workflows/PR.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d521e9dd0b..174d31e4f2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - releases/** workflow_call: workflow_dispatch: diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index b99fadbc9b..56d027a895 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -4,7 +4,6 @@ on: pull_request: branches: - master - - releases/** workflow_call: workflow_dispatch: