Skip to content

Commit 7f8f214

Browse files
authored
Fix broken CI: Make CI tooling constraint paths absolute (#382)
* Update pip and pipx syntax in test workflow Updated the syntax used for specifying constraints during pip, poetry, and nox installations in the GitHub tests workflow. Shortened "--constraint" to "-c" for pip operations, and wrapped pip arguments in quotes for pipx operations for better readability and consistency. * add github workspace prefix to file paths * Refactor $GITHUB_WORKSPACE usage in test workflows Updated all instances of $GITHUB_WORKSPACE usage in the .github/workflows/tests.yml file to ${GITHUB_WORKSPACE}. This ensures proper variable usage within the GitHub Actions environment. Fixed all occurrences in pip, pipx, Poetry, and Nox installation steps. * Update GitHub workflow to use env variable The commit replaces the use of `GITHUB_WORKSPACE` to `env.GITHUB_WORKSPACE` in various pip, pipx, and poetry install commands throughout the GitHub actions workflow. This is to ensure that the environmental variable is consistently used for accessing the workspace path. * Update GitHub actions paths The commit replaces the use of environment variables with the built-in GitHub context for specified paths. Changes were made in the 'tests.yml' workflow file, particularly on steps that upgrade pip, install Poetry and Nox. This is to ensure the uniformity and efficiency of the action scripts.
1 parent 8124a56 commit 7f8f214

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Upgrade pip
4646
run: |
47-
pip install --constraint=.github/workflows/constraints.txt pip
47+
pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip
4848
pip --version
4949
5050
- name: Upgrade pip in virtual environments
@@ -58,13 +58,13 @@ jobs:
5858
5959
- name: Install Poetry
6060
run: |
61-
pipx install --pip-args=--constraint=.github/workflows/constraints-poetry.txt poetry
61+
pipx install --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints-poetry.txt" poetry
6262
poetry --version
6363
6464
- name: Install Nox
6565
run: |
66-
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
67-
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
66+
pipx install --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox
67+
pipx inject --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry
6868
nox --version
6969
7070
- name: Compute pre-commit cache key
@@ -123,18 +123,18 @@ jobs:
123123

124124
- name: Upgrade pip
125125
run: |
126-
pip install --constraint=.github/workflows/constraints.txt pip
126+
pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip
127127
pip --version
128128
129129
- name: Install Poetry
130130
run: |
131-
pipx install --pip-args=--constraint=.github/workflows/constraints-poetry.txt poetry
131+
pipx install --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints-poetry.txt" poetry
132132
poetry --version
133133
134134
- name: Install Nox
135135
run: |
136-
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
137-
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
136+
pipx install --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox
137+
pipx inject --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry
138138
nox --version
139139
140140
- name: Download coverage data

0 commit comments

Comments
 (0)