CI-integrationtests #3592
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI-integrationtests | |
# Integration tests for applications | |
env: | |
SIMTOOLS_DB_SERVER: ${{ secrets.DB_SERVER }} | |
SIMTOOLS_DB_API_USER: ${{ secrets.DB_API_USER }} | |
SIMTOOLS_DB_API_PW: ${{ secrets.DB_API_PW }} | |
SIMTOOLS_DB_API_PORT: ${{ secrets.DB_API_PORT }} | |
SIMTOOLS_DB_SIMULATION_MODEL: "CTAO-Simulation-Model-LATEST" | |
SIMTOOLS_SIMTEL_PATH: "/workdir/sim_telarray/" | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
testbuilding: | |
# Build the package and check if it is installable | |
# (tests among others that all components are there) | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Build the package | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade build | |
python -m build | |
integrationtests: | |
# Run integration tests | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/gammasim/simtools-dev:latest | |
options: --user 0 | |
strategy: | |
fail-fast: false | |
matrix: | |
type: ['6.0.0', '5.0.0'] | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set PATH | |
run: | | |
echo "PATH=\$PATH:/usr/bin:/usr/local/bin:$SIMTOOLS_SIMTEL_PATH" >> "$GITHUB_ENV" | |
- name: Run integration tests | |
shell: bash -l {0} | |
run: | | |
source /workdir/env/bin/activate | |
pip install -e '.[tests,dev,doc]' | |
pytest --model_version=${{ matrix.type }} --color=yes --durations=20 -n auto --dist loadscope --no-cov tests/integration_tests/ |