CI-integrationtests #1162
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 | |
# Execute integration tests for applications | |
# | |
env: | |
SIMTOOLS_SIMTEL_PATH: ${{ github.workspace }}/ | |
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 }} | |
on: | |
pull_request: | |
branches: [main] | |
types: [opened, synchronize] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
integrationtests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: "3.9" | |
install-method: mamba | |
- os: ubuntu-latest | |
python-version: "3.9" | |
install-method: pip | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Prepare mamba installation | |
if: matrix.install-method == 'mamba' | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
run: | | |
# setup correct python version | |
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml | |
- name: Install mamba dependencies | |
if: matrix.install-method == 'mamba' | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
create-args: python=${{ matrix.python-version }} | |
init-shell: bash | |
- name: Python setup | |
if: matrix.install-method == 'pip' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
check-latest: true | |
- name: Python dependencies | |
run: | | |
python --version | |
pip install '.[tests,dev,doc]' | |
- name: simteldependencies | |
run: | | |
sudo apt-get update -y -qq | |
sudo apt-get install -y -qq bash build-essential bzip2 csh gfortran gcc g++ git libgsl-dev make wget | |
- name: corsikasimtelpackage | |
run: | | |
wget --no-verbose https://syncandshare.desy.de/index.php/s/${{ secrets.CLOUD_SIMTEL }}/download | |
mv download corsika7.7_simtelarray.tar.gz | |
tar -xzf corsika7.7_simtelarray.tar.gz | |
./build_all prod5 qgs2 gsl | |
- name: run sim_telarray | |
run: | | |
echo "${SIMTOOLS_SIMTEL_PATH}" | |
ls "${SIMTOOLS_SIMTEL_PATH}" | |
- name: Integration tests | |
shell: bash -l {0} | |
run: pytest --color=yes --durations=10 --no-cov tests/integration_tests/ |