Skip to content

Add integration tests to new simtools-prod image#1955

Merged
GernotMaier merged 32 commits intomainfrom
simtools-prod-integration-test
Jan 8, 2026
Merged

Add integration tests to new simtools-prod image#1955
GernotMaier merged 32 commits intomainfrom
simtools-prod-integration-test

Conversation

@GernotMaier
Copy link
Copy Markdown
Contributor

@GernotMaier GernotMaier commented Dec 17, 2025

Add integration tests to new simtools production image.

  • test no_opt image only (as there is no functionality to request a certain AVX CPU in the CI)
  • call the `CI-integrationtests.yml' from the production workflow (first time we do something like that!)
  • requires to download the QGSjet tables in this case, as we do not include them in the production image

Check this CI workflow for a typical build and test procedure.

@GernotMaier GernotMaier self-assigned this Dec 17, 2025
@GernotMaier GernotMaier changed the base branch from main to image-building-prod December 17, 2025 20:11
@GernotMaier GernotMaier marked this pull request as ready for review December 18, 2025 16:24
Copilot AI review requested due to automatic review settings December 18, 2025 16:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables integration testing for the simtools-prod Docker image by making the CI-integrationtests.yml workflow reusable and calling it from the build-simtools-prod.yml workflow. The implementation tests only the no_opt (non-AVX optimized) image variant, simplifies the environment configuration process, and adds support for downloading QGSjet tables that are not included in production images.

Key Changes:

  • Made CI-integrationtests.yml reusable via workflow_call trigger with configurable container image and model versions
  • Added integration test execution to build-simtools-prod.yml workflow that runs after image build completes
  • Simplified and refactored environment variable setup in integration tests by sourcing .env_template directly

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
docs/changes/1955.feature.md Changelog entry documenting the new integration test capability for production images
docker/Dockerfile-simtools-prod Added bzip2 package to support decompression of QGSjet tables during testing
.github/workflows/build-simtools-prod.yml Added job outputs for no_opt tag, enabled PR builds, and integrated test-simtools-prod job calling CI-integrationtests.yml
.github/workflows/CI-integrationtests.yml Converted workflow to support workflow_call trigger, added conditional logic for prod vs dev containers, simplified environment setup, and added QGSjet download step for prod images

Comment thread .github/workflows/CI-integrationtests.yml Outdated
Comment thread .github/workflows/CI-integrationtests.yml
Comment thread .github/workflows/CI-integrationtests.yml Outdated
Comment thread .github/workflows/build-simtools-prod.yml
Comment thread .github/workflows/CI-integrationtests.yml
Comment thread .github/workflows/CI-integrationtests.yml
Comment thread .github/workflows/CI-integrationtests.yml
Comment thread .github/workflows/build-simtools-prod.yml Outdated
Base automatically changed from image-building-prod to main January 5, 2026 10:27
Comment thread .github/workflows/build-simtools-prod.yml Fixed
Copy link
Copy Markdown
Collaborator

@tobiaskleiner tobiaskleiner left a comment

Choose a reason for hiding this comment

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

Thanks @GernotMaier, few minor comments, but all good otherwise.

description: 'Model versions to test'
required: false
type: string
default: '["7.0.0","6.0.2","5.0.0","6.0.2,6.1.1"]'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

missing quotes for the last two?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You mean "6.0.2,6.1.1"? This needs to be given this way, otherwise it is not passed on correctly to the tool.

fail-fast: false
matrix:
model_version: ['7.0.0', '6.0.2', '5.0.0', '6.0.2,6.1.1']
model_version: ${{ fromJSON(inputs.model_versions || '["7.0.0","6.0.2","5.0.0","6.0.2,6.1.1"]') }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we define envs for these defaults at the beginning? Such as:


env:
  DEFAULT_CONTAINER_IMAGE: ghcr.io/gammasim/simtools-dev:latest
  DEFAULT_MODEL_VERSIONS: '["7.0.0","6.0.2","5.0.0","6.1.1"]'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just tried it - but env variables are not recognized that this step of the workflow. Otherwise this would be nice.

python -m build

integration_tests:
runs-on: ubuntu-latest
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we adress the warning above?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, fixed!

@ctao-sonarqube
Copy link
Copy Markdown

ctao-sonarqube bot commented Jan 8, 2026

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@GernotMaier
Copy link
Copy Markdown
Contributor Author

Thanks @tobiaskleiner for the review. I fixed the conflicts with main and will merge now.

@GernotMaier GernotMaier merged commit 3df607a into main Jan 8, 2026
22 checks passed
@GernotMaier GernotMaier deleted the simtools-prod-integration-test branch January 8, 2026 11:59
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.

4 participants