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

Add pre-run-script to the test workflow #177

Merged
merged 1 commit into from
Jul 28, 2023
Merged
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
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
type: boolean
description: Whether to use self-hosted runners to run the jobs.
default: true
pre-run-script:
description: Path to the bash script to be run before the integration tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say "integration" test? Also, should this be documented in the readme?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is copied from the input definition of the integration test workflow. I will fix the in the next pull request, thanks!

type: string

concurrency:
group: operator-workflows-${{ github.workflow }}-tests-${{ github.ref }}-self-hosted-${{ inputs.self-hosted-runner }}
Expand Down Expand Up @@ -172,6 +175,9 @@ jobs:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/[email protected]
- name: Pre-run script
if: ${{ inputs.pre-run-script != '' }}
run: bash -xe ${{ inputs.pre-run-script }}
- name: Install tox
run: python3 -m pip install tox
- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The following workflows are available:
|--------------------|----------|--------------------|-------------------|
| working-directory | string | "./" | Directory where jobs should be executed |
| self-hosted-runner | bool | true | Whether self-hosted-runner should be enabled |
| pre-run-script | string | "" | Path to the bash script to be run before the integration tests |

* comment: Posts the content of the artifact specified as a comment in a PR. It needs to be triggered from a PR triggered workflow.

Expand Down
Loading