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 possibility to execute some steps before and after a test group #60

Closed
nicolaferraro opened this issue Mar 11, 2020 · 0 comments · Fixed by #83
Closed

Add possibility to execute some steps before and after a test group #60

nicolaferraro opened this issue Mar 11, 2020 · 0 comments · Fixed by #83

Comments

@nicolaferraro
Copy link
Collaborator

Part of #55, depends on #57

See also #59

Let's add to the yaks-config.yaml file the possibility to run scripts pre and post executing the command:

config:
  namespace: {}
pre:
- script: file.sh
- run: |
    echo Start
post:
- run: |
    echo End
    echo Bye
- run: echo Bye! 

Let's assume linux/osx for the moment (which is also the standard environment in pipelines).

Pre and post are two array of object that can be of type script or run:

  • script references an executable file in a path that can be relative to the config file location
  • run is basically a sh script that can be executed directly. Under the hood we may materialize it into a real sh file in the os tmp dir and run it using the config file directory as context

Pre are executed before all tests in the test group. Post after.

christophd added a commit to christophd/yaks that referenced this issue Apr 20, 2020
…a test group

You can run scripts before/after a test group. Just add your commands to the yaks-config.yaml configuration for the test group
christophd added a commit that referenced this issue Apr 20, 2020
fix(#60): Add possibility to run scripts before/after a test group
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 a pull request may close this issue.

1 participant