Skip to content

Commit af5873d

Browse files
Mike ProsserMike Prosser
authored andcommitted
clean up yml and toml files
1 parent edf01a2 commit af5873d

File tree

5 files changed

+12
-19
lines changed

5 files changed

+12
-19
lines changed

.github/workflows/check_nipanel.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,15 @@ jobs:
2626
poetry-version: ${{ env.POETRY_VERSION }}
2727
- name: Check for lock changes
2828
run: poetry check --lock
29-
- name: Restore cached virtualenv
30-
uses: actions/cache/restore@v4
31-
id: restore-nipanel
29+
- name: Cache virtualenv
30+
uses: actions/cache@v4
3231
with:
3332
path: .venv
3433
key: nipanel-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
3534
- name: Install nipanel
3635
run: poetry install -v
37-
- name: Save cached virtualenv
38-
uses: actions/cache/save@v4
39-
if: steps.restore-nipanel.outputs.cache-hit != 'true'
40-
with:
41-
path: .venv
42-
key: ${{ steps.restore-nipanel.outputs.cache-primary-key }}
4336
- name: Lint
44-
run: poetry run ni-python-styleguide lint ./src/nipanel ./tests ./examples
37+
run: poetry run ni-python-styleguide lint
4538
- name: Mypy static analysis (Linux)
4639
run: poetry run mypy
4740
- name: Mypy static analysis (Windows)

.github/workflows/run_unit_tests.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,13 @@ jobs:
3030
uses: Gr1N/setup-poetry@v9
3131
with:
3232
poetry-version: ${{ env.POETRY_VERSION }}
33-
- name: Restore cached virtualenv
34-
uses: actions/cache/restore@v4
35-
id: restore-nipanel
33+
- name: Cache virtualenv
34+
uses: actions/cache@v4
3635
with:
3736
path: .venv
3837
key: nipanel-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
3938
- name: Install nipanel
4039
run: poetry install -v
41-
- name: Save cached virtualenv
42-
uses: actions/cache/save@v4
43-
if: steps.restore-nipanel.outputs.cache-hit != 'true'
44-
with:
45-
path: .venv
46-
key: ${{ steps.restore-nipanel.outputs.cache-primary-key }}
4740
- name: Run unit tests and code coverage
4841
run: poetry run pytest ./tests/unit -v --cov=nipanel --junitxml=test_results/nipanel-${{ matrix.os }}-py${{ matrix.python-version }}.xml
4942
- name: Upload test results

poetry.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[virtualenvs]
2+
in-project = true

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ mypy-protobuf = ">=3.4"
3333
requires = ["poetry-core>=1.8.0"]
3434
build-backend = "poetry.core.masonry.api"
3535

36+
[tool.ni-python-styleguide]
37+
extend_exclude = ".tox,docs,src/ni/pythonpanel/v1"
38+
3639
[tool.mypy]
3740
files = "examples/,src/nipanel/,tests/"
3841
namespace_packages = true

tests/unit/test_placeholder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test___placeholder() -> None:
2+
pass

0 commit comments

Comments
 (0)