Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 2 additions & 5 deletions .github/actions/run-monitored-tmpnet-cmd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ description: 'Run the provided command in an environment configured to monitor t

inputs:
run:
description: "the bash script to run e.g. ./scripts/my-script.sh"
description: "the task invocation e.g. ./scripts/run_task.sh my-task"
required: true
run_env:
description: 'a string containing env vars for the command e.g. "MY_VAR1=foo MY_VAR2=bar"'
default: ''
runtime:
description: 'the tmpnet runtime being used'
default: 'process'
Expand Down Expand Up @@ -82,7 +79,7 @@ runs:
- name: Run command
shell: bash
# --impure ensures the env vars are accessible to the command
run: ${{ inputs.run_env }} $GITHUB_ACTION_PATH/nix-develop.sh --impure --command bash -x ${{ inputs.run }}
run: $GITHUB_ACTION_PATH/nix-develop.sh --impure --command bash -x ${{ inputs.run }}
env:
# Always collect metrics locally even when nodes are running in kube to enable collection from the test workload
TMPNET_START_METRICS_COLLECTOR: ${{ inputs.prometheus_username != '' }}
Expand Down
11 changes: 4 additions & 7 deletions tests/fixture/tmpnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,12 @@ Example usage:

# A qualified path is required for use outside of avalanchego
# e.g. `ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@[sha or tag]`
uses: ./.github/actions/run-monitored-tmpnet-cmd #
uses: ./.github/actions/run-monitored-tmpnet-cmd

with:
# This needs to be the path to a bash script
run: ./scripts/tests.e2e.sh

# Env vars for the script need to be provided via run_env as a space-separated string
# e.g. `MY_VAR1=foo MY_VAR2=bar`
run_env: E2E_SERIAL=1
# This should be a task invocation, not a script. The task should internalize arguments and env
# vars to ensure that the job can be reproduced locally with minimal expertise.
run: ./scripts/run_task.sh test-e2e-ci

# Sets the prefix of the artifact containing the tmpnet network dir for this job.
# Only required if a workflow uses this action more than once so that each artifact
Expand Down