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

Add workflow for running integration tests on a dedicated VM #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RomanIakovlev
Copy link
Collaborator

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.

@RomanIakovlev RomanIakovlev marked this pull request as ready for review November 1, 2024 15:52
@RomanIakovlev RomanIakovlev requested review from elrayle, Copilot and qtomlinson and removed request for Copilot November 1, 2024 15:52
Copy link
Collaborator

@qtomlinson qtomlinson left a 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,
Copy link
Collaborator

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.

@qtomlinson
Copy link
Collaborator

qtomlinson commented Nov 6, 2024

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
Copy link
Collaborator

@qtomlinson qtomlinson Nov 6, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants