Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches:
- master
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_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
19 changes: 19 additions & 0 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR

on:
pull_request:
branches:
- master
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
2 changes: 1 addition & 1 deletion .github/workflows/PUBLIC_CODECOV_TOKEN_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/ensure_codegen_up_to_date.yml
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions .github/workflows/run_build_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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: 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
102 changes: 102 additions & 0 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Run unit tests

on:
workflow_call:

permissions: {}

jobs:
run_unit_tests:
name: Run unit tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- 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'
- os: ubuntu-latest
python-version: '3.14'
tox-version: '314'
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: 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: Build installers
run: tox -c tox.ini -e py${{ matrix.tox-version }}-installers
- name: Run unit tests
run: >-
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
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()
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||:
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/status_project.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
4 changes: 2 additions & 2 deletions generated/nidcpower/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
4 changes: 2 additions & 2 deletions generated/nidigital/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
4 changes: 2 additions & 2 deletions generated/nidmm/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
4 changes: 2 additions & 2 deletions generated/nifgen/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
4 changes: 2 additions & 2 deletions generated/nimodinst/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
4 changes: 2 additions & 2 deletions generated/nirfsa/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
4 changes: 2 additions & 2 deletions generated/nirfsg/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/CI.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/CI.yml

.. |MITLicense| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:alt: MIT License
Expand Down
Loading
Loading