Skip to content

Commit

Permalink
Fix broken CI: Make CI tooling constraint paths absolute (#382)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
tasansal committed Apr 4, 2024
1 parent 8124a56 commit 7f8f214
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip
pip --version
- name: Upgrade pip in virtual environments
Expand All @@ -58,13 +58,13 @@ jobs:
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints-poetry.txt poetry
pipx install --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints-poetry.txt" 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="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox
pipx inject --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry
nox --version
- name: Compute pre-commit cache key
Expand Down Expand Up @@ -123,18 +123,18 @@ jobs:

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints-poetry.txt poetry
pipx install --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints-poetry.txt" 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="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox
pipx inject --pip-args="-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry
nox --version
- name: Download coverage data
Expand Down

0 comments on commit 7f8f214

Please sign in to comment.