Skip to content

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

Merged
RomanIakovlev merged 4 commits intomainfrom
roman/it_infra1
Nov 19, 2024
Merged

Add workflow for running integration tests on a dedicated VM#113
RomanIakovlev merged 4 commits intomainfrom
roman/it_infra1

Conversation

@RomanIakovlev
Copy link
Copy Markdown
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 Copilot, elrayle and qtomlinson and removed request for Copilot November 1, 2024 15:52
Copy link
Copy Markdown
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.

@qtomlinson
Copy link
Copy Markdown
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
Copy Markdown
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?

@RomanIakovlev
Copy link
Copy Markdown
Collaborator Author

@qtomlinson thanks for your feedback, I've added the changes you requested. I have to admit, it looks much better this way!

Copy link
Copy Markdown
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.

LGTM!

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