Skip to content

Commit

Permalink
FIX: run pytest with specified Python version (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Jan 17, 2025
1 parent 8e7ea3a commit 7ae9956
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 24 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/docnb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ on:

jobs:
docnb:
env:
EXECUTE_NB: yes
FORCE_COLOR: yes
GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UV_PYTHON: ${{ inputs.python-version }}
name: Execute and build documentation
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: |
Expand All @@ -46,12 +49,6 @@ jobs:
with:
ijulia: true
- name: Build documentation and run notebooks
env:
EXECUTE_NB: yes
FORCE_COLOR: yes
GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UV_SYSTEM_PYTHON: 1
run: >-
uv run \
--group doc \
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ on:

jobs:
linkcheck:
env:
FORCE_COLOR: yes
UV_PYTHON: ${{ inputs.python-version }}
name: Check external links
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: |
Expand All @@ -28,9 +28,7 @@ jobs:
sudo apt-get update -y
sudo apt-get install -y ${{ inputs.apt-packages }}
- env:
FORCE_COLOR: yes
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UV_SYSTEM_PYTHON: 1
name: Run Sphinx linkcheck
run: >-
uv run \
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@ jobs:
env:
FORCE_COLOR: 1
TERM: xterm-256color
UV_SYSTEM_PYTHON: 1
UV_PYTHON: ${{ inputs.python-version }}
if: needs.determine-hooks.outputs.skipped-hooks
needs: determine-hooks
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,14 @@ jobs:
name: Run unit tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UV_PYTHON: ${{ matrix.python-version }}
needs: create-matrix
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: |
Expand Down Expand Up @@ -97,9 +95,7 @@ jobs:
if: inputs.multithreaded
name: Determine pytest multithreading flags
run: echo "flags=--numprocesses=auto" | tee -a $GITHUB_OUTPUT
- env:
UV_SYSTEM_PYTHON: 1
name: Run tests with pytest
- name: Run tests with pytest
run: >-
uv run \
--group test \
Expand Down

0 comments on commit 7ae9956

Please sign in to comment.