-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create separate receptorctl workflows with matrices (#1003)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
- Loading branch information
Showing
3 changed files
with
125 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
name: Receptorctl nox sessions | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python-version: | ||
type: string | ||
description: The Python version to use. | ||
required: true | ||
session: | ||
type: string | ||
description: The nox session to run. | ||
required: true | ||
download-receptor: | ||
type: boolean | ||
description: Whether to perform go binary download. | ||
required: false | ||
default: false | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
NOXSESSION: ${{ inputs.session }} | ||
|
||
jobs: | ||
nox: | ||
runs-on: ubuntu-latest | ||
|
||
name: >- # can't use `env` in this context: | ||
Run `receptorctl` ${{ inputs.session }} session | ||
steps: | ||
- name: Download the `receptor` binary | ||
if: fromJSON(inputs.download-receptor) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: receptor | ||
path: /usr/local/bin/ | ||
|
||
- name: Set executable bit on the `receptor` binary | ||
if: fromJSON(inputs.download-receptor) | ||
run: sudo chmod a+x /usr/local/bin/receptor | ||
|
||
- name: Set up nox | ||
uses: wntrblm/nox@2024.04.15 | ||
with: | ||
python-versions: ${{ inputs.python-version }} | ||
|
||
- name: Check out the source code from Git | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Needed for the automation in Nox to find the last tag | ||
sparse-checkout: receptorctl | ||
|
||
- name: Provision nox environment for ${{ env.NOXSESSION }} | ||
run: nox --install-only | ||
working-directory: ./receptorctl | ||
|
||
- name: Run `receptorctl` nox ${{ env.NOXSESSION }} session | ||
run: nox --no-install | ||
working-directory: ./receptorctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters