Skip to content

Use absolute path for pip constraints in CI #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
NOXSESSION: ${{ matrix.session }}
FORCE_COLOR: "1"
PRE_COMMIT_COLOR: "always"
PIP_CONSTRAINTS: ${{ github.workspace }}/.github/workflows/constraints.txt

steps:
- name: Check out the repository
Expand All @@ -38,7 +39,7 @@ jobs:

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install --constraint=$PIP_CONSTRAINTS pip
pip --version

- name: Upgrade pip in virtual environments
Expand All @@ -52,13 +53,13 @@ jobs:

- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
pipx install --pip-args=--constraint=$PIP_CONSTRAINTS poetry
poetry --version

- name: Install Nox
run: |2
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
pipx install --pip-args=--constraint=$PIP_CONSTRAINTS nox
pipx inject --pip-args=--constraint=$PIP_CONSTRAINTS nox nox-poetry
nox --version

- name: Compute pre-commit cache key
Expand Down Expand Up @@ -106,6 +107,8 @@ jobs:
coverage:
runs-on: ubuntu-latest
needs: tests
env:
PIP_CONSTRAINTS: ${{ github.workspace }}/.github/workflows/constraints.txt
steps:
- name: Check out the repository
uses: actions/checkout@v3
Expand All @@ -117,18 +120,18 @@ jobs:

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install --constraint=$PIP_CONSTRAINTS pip
pip --version

- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
pipx install --pip-args=--constraint=$PIP_CONSTRAINTS poetry
poetry --version

- name: Install Nox
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
pipx install --pip-args=--constraint=$PIP_CONSTRAINTS nox
pipx inject --pip-args=--constraint=$PIP_CONSTRAINTS nox nox-poetry
nox --version

- name: Download coverage data
Expand Down
Loading