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

Post run cmd in pipeline tests #100

Merged
merged 8 commits into from
May 24, 2024
Merged

Conversation

endast
Copy link
Collaborator

@endast endast commented May 24, 2024

What

This PR adds support for a postrun_cmd to the run-pipeline workflow. This enables you to add an extra command to run after the pipeline is done. For example, you could add a script to verify the output.

Screenshot 2024-05-24 at 13 43 44

Screenshot 2024-05-24 at 13 40 29
Screenshot 2024-05-24 at 13 40 24

Testing

To test this you can check out this pr and add a postrun_cmd to the yaml for example:

jobs:
  # Training Pipeline
  Smoke-RunTraining:
    uses: ./.github/workflows/run-pipeline.yml
    with:
      pipeline_file: ./pipelines/run_training.snakefile
      environment_file: ./deeprvat_env_no_gpu.yml
      postrun_cmd: echo "Hello World from post"

  Pipeline-Tests-RunTraining:
    needs: Smoke-RunTraining
    uses: ./.github/workflows/run-pipeline.yml
    with:
      pipeline_file: ./pipelines/run_training.snakefile
      environment_file: ./deeprvat_env_no_gpu.yml
      dry_run: false
      postrun_cmd: python --version

Screenshot 2024-05-24 at 13 35 26

Screenshot 2024-05-24 at 13 35 20

You can also add a post_cmd that should fail example:

jobs:
  # Training Pipeline
  Smoke-RunTraining:
    uses: ./.github/workflows/run-pipeline.yml
    with:
      pipeline_file: ./pipelines/run_training.snakefile
      environment_file: ./deeprvat_env_no_gpu.yml
      postrun_cmd: echo "Hi this should fail!" && exit 1

image

@endast endast requested review from Marcel-Mueck and bfclarke May 24, 2024 11:45
@endast endast changed the title Feature/postrun cmd pipeline tests Post run cmd in pipeline tests May 24, 2024
Copy link
Collaborator

@Marcel-Mueck Marcel-Mueck left a comment

Choose a reason for hiding this comment

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

looks good

@endast endast merged commit 39fab8d into main May 24, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants