Skip to content
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

Allow tox workflow to receive an optional environment argument #238

Merged
merged 1 commit into from
Oct 21, 2024
Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
description: Default python version for other jobs
required: false
type: string
environment:
default: ""
description: Which GHA environment to use
required: false
type: string
jobs_producing_coverage:
default: 6
description: Number of jobs producing coverage.xml files
Expand Down Expand Up @@ -58,6 +63,7 @@ jobs:
prepare:
name: prepare
runs-on: ubuntu-24.04
environment: ${{ inputs.environment }}
outputs:
matrix: ${{ steps.generate_matrix.outputs.matrix }}
steps:
Expand All @@ -76,6 +82,7 @@ jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os || 'ubuntu-24.04' }}
environment: ${{ inputs.environment }}
needs:
- prepare
defaults:
Expand Down Expand Up @@ -158,6 +165,7 @@ jobs:
# https://github.com/actions/toolkit/issues/193
check:
if: always()
environment: ${{ inputs.environment }}
permissions:
pull-requests: write # allow codenotify to comment on pull-request
id-token: write
Expand Down