DLRawTriggerReader #806
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags: | |
| - "**" | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] | |
| python-version: ['3.12', '3.13', '3.14'] | |
| ctapipe-version: ['latest', 'nightly'] | |
| max-parallel: 6 | |
| runs-on: ${{ matrix.os }} | |
| # Allow failures for nightly ctapipe or 3.14 builds | |
| continue-on-error: ${{ matrix.ctapipe-version == 'nightly' || matrix.python-version == '3.14' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Miniconda | |
| run: | | |
| wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh | |
| bash miniconda.sh -b -p $HOME/miniconda | |
| echo "$HOME/miniconda/bin" >> $GITHUB_PATH | |
| source $HOME/miniconda/etc/profile.d/conda.sh | |
| conda activate base | |
| conda config --add channels conda-forge | |
| conda install -y mamba | |
| - name: Create environment for Python ${{ matrix.python-version }} | |
| run: | | |
| source $HOME/miniconda/etc/profile.d/conda.sh | |
| conda activate base | |
| mamba create -y -n dl1dh -c conda-forge python==${{ matrix.python-version }} | |
| conda activate dl1dh | |
| - name: Pre-script setup | |
| run: | | |
| source $HOME/miniconda/etc/profile.d/conda.sh | |
| conda activate dl1dh | |
| sudo apt-get update | |
| sudo apt-get install -y git | |
| pip install --upgrade pip | |
| pip install pylint pylint-exit anybadge | |
| pip install eventio | |
| if [ "${{ matrix.ctapipe-version }}" = "nightly" ]; then | |
| pip install git+https://github.com/cta-observatory/ctapipe.git | |
| else | |
| pip install ctapipe | |
| fi | |
| pip install pytest flake8 | |
| - name: Add MKL_THREADING_LAYER variable | |
| run: echo "MKL_THREADING_LAYER=GNU" >> $GITHUB_ENV | |
| - name: Lint with flake8 | |
| run: | | |
| source $HOME/miniconda/etc/profile.d/conda.sh | |
| conda activate dl1dh | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Install package with pip | |
| run: | | |
| source $HOME/miniconda/etc/profile.d/conda.sh | |
| conda activate dl1dh | |
| pip install -e . | |
| - name: Run pytest | |
| run: | | |
| source $HOME/miniconda/etc/profile.d/conda.sh | |
| conda activate dl1dh | |
| pytest |