Conversation
UlisesGascon
left a comment
There was a problem hiding this comment.
Hey @rajbos! I think is a great idea. I have been thinking for a while how to manage the tests for this project as this can be a tricky think soon if more people want to collaborate (#10).
Thank you so much for take the initiative in this matter! The unit testing in this scenario is quite limited as there are many things that we can't control or mock in terms of execution and so on, so E2E tests this way seems like a good approach.
I will love to add some Jest tests that can be executed as an step in each scenario that we want to cover, to avoid the need to manually review the artifacts that we are creating when we run the gh action. But I can work on that in a separate PR to don't block your changes.
| on: | ||
| push: |
There was a problem hiding this comment.
I think we can define the scope this way, but maybe we can leave the pull_request open to all scenarios and not only against main branch
| on: | |
| push: | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main |
| @@ -0,0 +1,162 @@ | |||
| name: Test the action | |||
There was a problem hiding this comment.
I will love to have more descriptive name and emoji if possible 🤣
| name: Test the action | |
| name: ☕️ E2E Tests |
I used this workflow to test my changes, so I could visually see the results of the report. You can see it as an integration test to validate if the changes actually work. Unit testing is level 1, and then this is one level up. This saved me time, since I didn't have to trigger another workflow that uses my version of the action (and then trigger it with every change I made).