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

test: use test-launch.sh to run the tests #1649

Merged

Conversation

goneri
Copy link
Contributor

@goneri goneri commented Nov 7, 2024

Use one single script called ./tools/test-launch.sh to trigger all the different tests:

  • COVERAGE=1 or -c to enable the code coverage
  • COVE_VERSION to set the vscode-extension-tester parameter (e.g max or min)
  • MOCK_LIGHTSPEED_API (1 or ``): set it to 1 to dynamically start the mocked server and set `TEST_LIGHTSPEED_URL`
  • TEST_TYPE: e2e or ui (default)

The goal is to reduce the amount of reentrant yarn calls and provide a more linar execution flow.
Bonus points:

  • we don't need start-server-and-test anymore
  • we avoid a lot of complexity with how we deal with TEST_LIGHTSPEED_URL on MacOS.

@goneri goneri requested review from a team as code owners November 7, 2024 21:51
@goneri goneri force-pushed the goneri/test-use-test-ui.sh-to-run-the-tests_165 branch from fda6b08 to e79c4ad Compare November 7, 2024 22:04
@goneri goneri marked this pull request as draft November 7, 2024 22:07
@goneri goneri force-pushed the goneri/test-use-test-ui.sh-to-run-the-tests_165 branch from e79c4ad to def053d Compare November 7, 2024 22:10
@goneri goneri force-pushed the goneri/test-use-test-ui.sh-to-run-the-tests_165 branch from def053d to a466a14 Compare November 7, 2024 22:20
Use one single script called `./tools/test-launch.sh` to trigger all the different tests:

- `COVERAGE=1` or `-c` to enable the code coverage
- `COVE_VERSION` to set the vscode-extension-tester parameter (e.g `max` or `min`)
- `MOCK_LIGHTSPEED_API` (`1` or ``): set it to `1` to dynamically start the mocked server and set `TEST_LIGHTSPEED_URL`
- `TEST_TYPE`: `e2e` or `ui` (default)

The goal is to reduce the amount of reentrant `yarn` calls and provide a more linar execution flow.
Bonus points:
- we don't need `start-server-and-test` anymore
- we avoid a lot of complexity with how we deal with `TEST_LIGHTSPEED_URL` on MacOS.
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

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

I love the direction. My only question is why the yarn.lock file is modified when you did not modify package.json in any way?

package.json Show resolved Hide resolved
@goneri
Copy link
Contributor Author

goneri commented Nov 8, 2024

I love the direction. My only question is why the yarn.lock file is modified when you did not modify package.json in any way?

https://github.com/ansible/vscode-ansible/pull/1649/files#r1834505006

@goneri goneri requested a review from ssbarnea November 8, 2024 14:36
@ssbarnea ssbarnea self-requested a review November 8, 2024 15:42
@ssbarnea ssbarnea merged commit 8e2c3f9 into ansible:main Nov 8, 2024
14 checks passed
Copy link
Collaborator

@TamiTakamiya TamiTakamiya left a comment

Choose a reason for hiding this comment

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

Thank you @goneri! This was long due change that I should have made months ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants