-
Notifications
You must be signed in to change notification settings - Fork 162
42 lines (41 loc) · 1.21 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build
on:
workflow_call:
workflow_dispatch:
jobs:
build:
name: Build
runs-on:
- ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
# The codegen scripts require Python 3.8 or later.
python-version: "3.8"
- name: Set up Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: "1.8.3"
- name: Check Poetry version
run: poetry --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
poetry install --all-extras
- name: Run linters
run: poetry run ni-python-styleguide lint
- name: Run mypy (Linux)
run: poetry run mypy
- name: Run mypy (Windows)
run: poetry run mypy --platform win32
- name: Run Bandit security checks
run: poetry run bandit -c pyproject.toml -r generated/nidaqmx
- name: Generate ni-daqmx files
run: |
rm -fr generated/nidaqmx
poetry run python src/codegen --dest generated/nidaqmx
- name: Check for files dirtied by codegen
run: git diff --exit-code