-
Notifications
You must be signed in to change notification settings - Fork 10
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 workflow for running integration tests on a dedicated VM #113
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement for running the integration tests! Minor comments for the tests.
@@ -72,7 +76,7 @@ const componentsDynamic = async () => { | |||
} | |||
|
|||
module.exports = { | |||
devApiBaseUrl, | |||
getDevApiBaseUrl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about devApiBaseUrl : getDevApiBaseUrl(),
? Then this url change is encapsulated in this config file and all the tests do not need to be changed.
The custom infra does not have access to other services, e.g. Application Insight or Azure Search. Some of the integration tests may fail. If verifying definitions is the main purpose, in a future PR, we can change to run only definitionTest. |
# Replace both GitHub tokens with the provided token | ||
sed -i "s/^CRAWLER_GITHUB_TOKEN=.*/CRAWLER_GITHUB_TOKEN=${GITHUB_TOKEN}/" .env | ||
sed -i "s/^CURATION_GITHUB_TOKEN=.*/CURATION_GITHUB_TOKEN=${GITHUB_TOKEN}/" .env | ||
echo "" >> .env && echo "CRAWLER_SCANCODE_PARALLELISM=14" >> .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a separate PR, could we document CRAWLER_SCANCODE_PARALLELISM in the environment variable section in https://github.com/clearlydefined/operations/blob/main/overview.md?
This change adds a new workflow to run the existing integration tests on a dedicated virtual machine, created and destroyed for each test run.
This workflow creates and provisions a VM, using the Docker Compose setup available at https://github.com/clearlydefined/docker_dev_env_experiment. After provisioning, it runs the existing integration test suite against that newly created environment.
Advantage of running tests on custom infra is that it's possible to use a more powerful machine for the crawler, leading to a much faster test execution. E.g. static components test completes in ~5 minutes on a 16-core VM.