Skip to content
Merged
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
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ on:
jobs:
build:
name: Build
runs-on:
runs-on:
- ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
id: setup-python
with:
# The codegen scripts require Python 3.9 or later.
python-version: "3.9"
Expand All @@ -22,6 +23,11 @@ jobs:
poetry-version: "1.8.3"
- name: Check Poetry version
run: poetry --version
- name: Cache virtualenv (all extras)
uses: actions/cache@v4
with:
path: .venv
key: nidaqmx-all-extras-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.9"
- name: Set up Poetry
Expand All @@ -21,6 +22,13 @@ jobs:
poetry-version: "1.8.3"
- name: Check Poetry version
run: poetry --version
- name: Cache virtualenvs
uses: actions/cache@v4
with:
path: |
.venv
.tox
key: generate-docs-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/run_system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
uses: actions/checkout@v4
- name: Import DAQmx config
run: C:\nidaqmxconfig\targets\win64U\x64\msvc-14.0\release\nidaqmxconfig.exe --eraseconfig --import tests\max_config\nidaqmxMaxConfig.ini
- name: Cache virtualenvs
uses: actions/cache@v4
with:
path: |
.venv
.tox
key: run-system-tests-${{ runner.os }}-${{ matrix.configuration }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Run system tests
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,29 @@ jobs:
poetry-version: "1.8.3"
- name: Check Poetry version
run: poetry --version
- name: Restore cached virtualenv (main only)
uses: actions/cache/restore@v4
id: restore-nidaqmx-main-only
with:
path: .venv
key: nidaqmx-main-only-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install main package dependencies
run: |
python -m pip install --upgrade pip
poetry install --only main
- name: check installdriver subcommand can be invoked
run: poetry run nidaqmx installdriver --help
- name: Save cached virtualenv (main only)
uses: actions/cache/save@v4
if: steps.restore-nidaqmx-main-only.outputs.cache-hit != 'true'
with:
path: .venv
key: ${{ steps.restore-nidaqmx-main-only.outputs.cache-primary-key }}
- name: Cache virtualenv (with dev dependencies)
uses: actions/cache@v4
with:
path: .venv
key: nidaqmx-with-dev-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dev dependencies
run: poetry install
- name: Run unit tests
Expand Down