We have a test workflow which does two things:
- Run unit and e2e tests with
yarn test
- Run all the action commands (
create-job, next-job, mark-job-as-done) in the current branch.
I think we could refactor that workflow to include 3 jobs:
- Unit tests: all except
main.test.ts
- E2e tests: only
main.test.ts
- Integration tests: workflows steps using the GitHub Action.
The reason why main.test.ts is a little bit different is that it requires building the app (yarn build) and it uses the app as a console app running node src/lib/main.js.
Regarding integration tests, I think we should test the action commands in a different git repo, not in the same branch we are working on as we do for the other tests. We need to create a new initialized git repo and run the action using the testing repo. This way we avoid adding spurious git commits.
We have a test workflow which does two things:
yarn testcreate-job,next-job,mark-job-as-done) in the current branch.I think we could refactor that
workflowto include 3 jobs:main.test.tsmain.test.tsThe reason why
main.test.tsis a little bit different is that it requires building the app (yarn build) and it uses the app as a console app runningnode src/lib/main.js.Regarding integration tests, I think we should test the action commands in a different git repo, not in the same branch we are working on as we do for the other tests. We need to create a new initialized git repo and run the action using the testing repo. This way we avoid adding spurious git commits.