Change workflow so that unit build, unit tests and functional tests are separated. Add caching parameter for npm ci result.
Motivation and Context
This modification allows relaunching unit tests or functional tests independently if they somehow fail due to connection issue while fetching some data (which can happen often times). Unit tests and functional tests can also run in parallel, speeding up the process a bit (by the duration of unit tests).
I figured this solution out while working on CI for commits name checking, thought it would be a little improvement. Let me know what you think.
The pros are given in previous description, and the cons I identified are the following :
We need to run npm ci three times : when building, for unit tests and for functional tests. It is however minor due to the usage of cache.
We need to upload an artifact from build to github action each time the integration script is ran. This is because functional tests need itowns bundle to work, so they also download the artifact at each run.
Before contributing
Read CONTRIBUTING.md and CODING.md to apply
iTowns
conventions on PRs, Git history and code.Description
Change workflow so that unit build, unit tests and functional tests are separated. Add caching parameter for
npm ci
result.Motivation and Context
This modification allows relaunching unit tests or functional tests independently if they somehow fail due to connection issue while fetching some data (which can happen often times). Unit tests and functional tests can also run in parallel, speeding up the process a bit (by the duration of unit tests).
I figured this solution out while working on CI for commits name checking, thought it would be a little improvement. Let me know what you think.
The pros are given in previous description, and the cons I identified are the following :
npm ci
three times : when building, for unit tests and for functional tests. It is however minor due to the usage of cache.