Skip to content

Commit 028218c

Browse files
committed
add a pip install and lint to the PR build to validate install time deps without the lock
1 parent d9d3aec commit 028218c

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/PR.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,25 @@ jobs:
4343
uses: ni/python-actions/setup-python@9768589f3e50672173dad75a6fc181e4a85d33fa # v0.7.0
4444
with:
4545
python-version: ${{ matrix.python-version }}
46-
- name: Set up Poetry
47-
uses: ni/python-actions/setup-poetry@9768589f3e50672173dad75a6fc181e4a85d33fa # v0.7.0
48-
- name: Cache virtualenv
49-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
46+
47+
- name: Create a venv
48+
run: python -m venv ~/venv/.cache
49+
- name: Install the package
50+
run: ~/venv/.cache/bin/pip install .
51+
- name: Check that it runs
52+
run: ~/venv/.cache/bin/nps lint
53+
54+
- uses: Gr1N/setup-poetry@v8
55+
with:
56+
poetry-version: ${{ env.POETRY_VERSION }}
57+
- uses: actions/cache@v4
58+
with:
59+
path: ~/.cache/pypoetry/virtualenvs
60+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
61+
- uses: actions/cache@v2
5062
with:
51-
path: .venv
52-
key: nps-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
63+
path: ~/venv/.cache
64+
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
5365
- name: Install the Package
5466
run: poetry install -v
5567
- name: Run tests

0 commit comments

Comments
 (0)