Skip to content

Commit cc4214b

Browse files
committed
Re-use analyze-project from the python-actions repo
1 parent 8131821 commit cc4214b

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

.github/workflows/check_nipanel.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,21 @@ on:
77
jobs:
88
check_nipanel:
99
name: Check nipanel
10-
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
os: [windows-latest, ubuntu-latest, macos-latest]
13+
python-version: [3.9, 3.13]
14+
runs-on: ${{ matrix.os }}
1115
steps:
1216
- name: Check out repo
1317
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1418
- name: Set up Python
1519
uses: ni/python-actions/setup-python@8554e7ef74e95c9762962205f45a1e10c48de671 # v0.5.1
16-
id: setup-python
20+
with:
21+
python-version: ${{ matrix.python-version }}
1722
- name: Set up Poetry
1823
uses: ni/python-actions/setup-poetry@8554e7ef74e95c9762962205f45a1e10c48de671 # v0.5.1
19-
- name: Check for lock changes
20-
run: poetry check --lock
21-
- name: Cache virtualenv
22-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
23-
with:
24-
path: .venv
25-
key: nipanel-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
26-
- name: Install nipanel
27-
run: poetry install -v --with examples,docs
28-
- name: Lint
29-
run: poetry run ni-python-styleguide lint
30-
- name: Mypy static analysis (Linux)
31-
run: poetry run mypy
32-
- name: Mypy static analysis (Windows)
33-
run: poetry run mypy --platform win32
24+
- name: Analyze Python Project
25+
uses: ni/python-actions/analyze-project@21cdaf6ea6eaed0a7d5e49ea28c99a82c3840c39
3426
- name: Bandit security checks
3527
run: poetry run bandit -c pyproject.toml -r src/nipanel
36-
- name: Add virtualenv to the path for pyright-action
37-
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
38-
- name: Pyright static analysis (Linux)
39-
uses: jakebailey/pyright-action@6cabc0f01c4994be48fd45cd9dbacdd6e1ee6e5e # v2.3.3
40-
with:
41-
python-platform: Linux
42-
version: PATH
43-
- name: Pyright static analysis (Windows)
44-
uses: jakebailey/pyright-action@6cabc0f01c4994be48fd45cd9dbacdd6e1ee6e5e # v2.3.3
45-
with:
46-
python-platform: Windows
47-
version: PATH

0 commit comments

Comments
 (0)