Skip to content

Commit e4a7f97

Browse files
authored
Re-use analyze-project from the python-actions repo (#160)
* Re-use analyze-project from the python-actions repo * Test latest version of analyze-project * Update analyze-project to a newer version * Update the commit for the analyze-project action * Add version hint to analyze-project action reference
1 parent 2e45f1b commit e4a7f97

File tree

2 files changed

+18
-29
lines changed

2 files changed

+18
-29
lines changed

.github/workflows/CI.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ jobs:
1515
check_docs:
1616
name: Check docs
1717
uses: ./.github/workflows/check_docs.yml
18+
checks_succeeded:
19+
name: Checks succeeded
20+
needs: [check_nipanel, check_docs]
21+
runs-on: ubuntu-latest
22+
steps:
23+
- run: exit 0
1824
run_unit_tests:
1925
name: Run unit tests
2026
uses: ./.github/workflows/run_unit_tests.yml
21-
needs: [check_nipanel]
27+
needs: [checks_succeeded]
2228
report_test_results:
2329
name: Report test results
2430
uses: ./.github/workflows/report_test_results.yml

.github/workflows/check_nipanel.yml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,24 @@ 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@9768589f3e50672173dad75a6fc181e4a85d33fa # 0.7.0
1620
id: setup-python
21+
with:
22+
python-version: ${{ matrix.python-version }}
1723
- name: Set up Poetry
1824
uses: ni/python-actions/setup-poetry@9768589f3e50672173dad75a6fc181e4a85d33fa # 0.7.0
19-
- name: Check for lock changes
20-
run: poetry check --lock
21-
- name: Cache virtualenv
22-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
25+
- name: Analyze Python Project
26+
uses: ni/python-actions/analyze-project@9768589f3e50672173dad75a6fc181e4a85d33fa # 0.7.0
2327
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
28+
install-args: "--with examples"
3429
- name: Bandit security checks
35-
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
30+
run: poetry run bandit -c pyproject.toml -r src/nipanel

0 commit comments

Comments
 (0)