Skip to content
10 changes: 8 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ jobs:
check_docs:
name: Check docs
uses: ./.github/workflows/check_docs.yml
checks_succeeded:
name: Checks succeeded
needs: [check_nitypes, check_docs]
runs-on: ubuntu-latest
steps:
- run: exit 0
run_unit_tests:
name: Run unit tests
uses: ./.github/workflows/run_unit_tests.yml
needs: [check_nitypes]
needs: [checks_succeeded]
run_unit_tests_oldest_deps:
name: Run unit tests (oldest deps)
uses: ./.github/workflows/run_unit_tests_oldest_deps.yml
needs: [check_nitypes]
needs: [checks_succeeded]
report_test_results:
name: Report test results
uses: ./.github/workflows/report_test_results.yml
Expand Down
42 changes: 12 additions & 30 deletions .github/workflows/check_nitypes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,23 @@ on:
jobs:
check_nitypes:
name: Check nitypes
runs-on: ubuntu-latest
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
# Type checking requires an up-to-date NumPy.
# The latest NumPy only supports 3.11 and later
python-version: [3.11, 3.13]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Python
uses: ni/python-actions/setup-python@f42e2f27a585f5d47efcab79b608ec0ec97191c9 # v0.6.1
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry
uses: ni/python-actions/setup-poetry@f42e2f27a585f5d47efcab79b608ec0ec97191c9 # v0.6.1
- name: Check for lock changes
run: poetry check --lock
- name: Cache virtualenv
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: .venv
key: nitypes-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install nitypes
run: poetry install -v
- name: Lint
run: poetry run ni-python-styleguide lint
- name: Mypy static analysis (Linux)
run: poetry run mypy
- name: Mypy static analysis (Windows)
run: poetry run mypy --platform win32
- name: Analyze Python project
uses: ni/python-actions/analyze-project@f42e2f27a585f5d47efcab79b608ec0ec97191c9 # v0.6.1
- name: Bandit security checks
run: poetry run bandit -c pyproject.toml -r src/nitypes
- name: Add virtualenv to the path for pyright-action
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- name: Pyright static analysis (Linux)
uses: jakebailey/pyright-action@6cabc0f01c4994be48fd45cd9dbacdd6e1ee6e5e # v2.3.3
with:
python-platform: Linux
version: PATH
- name: Pyright static analysis (Windows)
uses: jakebailey/pyright-action@6cabc0f01c4994be48fd45cd9dbacdd6e1ee6e5e # v2.3.3
with:
python-platform: Windows
version: PATH
run: poetry run bandit -c pyproject.toml -r src/nitypes
Loading