Skip to content

CI-integrationtests #2616

CI-integrationtests

CI-integrationtests #2616

---
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: "Staging-CTA-Simulation-Model-v0-3-0"
SIMTOOLS_SIMTEL_PATH: "/workdir/sim_telarray/"
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
schedule:
- cron: "0 0 * * *"
jobs:
integrationtests:
runs-on: ubuntu-latest
container:
image: ghcr.io/gammasim/simtools-dev:latest
options: --user 0
strategy:
fail-fast: false
matrix:
type: ['2024-02-01', 'prod5']
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 '.[tests,dev,doc]'
export PYTHONPATH=$PYTHONPATH:.
pytest --model_version=${{ matrix.type }} --color=yes --durations=20 -n auto --dist loadscope --no-cov tests/integration_tests/