1-
21name : CI
32
43on :
@@ -15,39 +14,61 @@ jobs:
1514 strategy :
1615 matrix :
1716 os : [ubuntu-22.04]
18- pyv : [ '3.12', '3.13', '3.14']
19- max-parallel : 5
17+ python-version : ['3.12', '3.13', '3.14']
18+ ctlearn-version : ['latest', 'nightly']
19+ max-parallel : 6
2020 runs-on : ${{ matrix.os }}
21+ continue-on-error : ${{ matrix.ctlearn-version == 'nightly' || matrix.python-version == '3.14' }}
2122 steps :
22- - uses : actions/checkout@v4
23- - name : Set up Python ${{ matrix.pyv }}
24- run : |
25- # Install Miniconda
26- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
27- bash miniconda.sh -b -p $HOME/miniconda
28- echo "$HOME/miniconda/bin" >> $GITHUB_PATH
29- source $HOME/miniconda/bin/activate
30- # Install Mamba via conda (since we don't have mamba yet)
31- $HOME/miniconda/bin/conda config --add channels conda-forge
32- $HOME/miniconda/bin/conda install -y mamba=2.0.8
33- mamba install -y python=${{ matrix.pyv }}
34- - name : Add MKL_THREADING_LAYER variable
35- run : echo "MKL_THREADING_LAYER=GNU" >> $GITHUB_ENV
36- - name : Install dependencies with Mamba
37- run : |
38- source $HOME/miniconda/bin/activate
39- mamba env update --file environment.yml --name base
40- - name : Lint with flake8
41- run : |
42- source $HOME/miniconda/bin/activate
43- mamba install flake8
44- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
45- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
46- - name : Install with pip
47- run : |
48- pip install -e .
49- - name : Test with pytest
50- run : |
51- source $HOME/miniconda/bin/activate
52- mamba install pytest
53- pytest
23+ - uses : actions/checkout@v4
24+
25+ - name : Set up Miniconda
26+ run : |
27+ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
28+ bash miniconda.sh -b -p $HOME/miniconda
29+ echo "$HOME/miniconda/bin" >> $GITHUB_PATH
30+ source $HOME/miniconda/etc/profile.d/conda.sh
31+ conda config --add channels conda-forge
32+ conda install -y mamba
33+
34+ - name : Create Python environment
35+ run : |
36+ source $HOME/miniconda/etc/profile.d/conda.sh
37+ mamba create -y -n ctlearn python==${{ matrix.python-version }} -c conda-forge
38+ mamba activate ctlearn
39+
40+ - name : Install dependencies
41+ run : |
42+ source $HOME/miniconda/etc/profile.d/conda.sh
43+ mamba activate ctlearn
44+ sudo apt-get update
45+ sudo apt-get install -y git
46+ pip install --upgrade pip
47+ pip install pylint pylint-exit anybadge eventio pytest flake8
48+ if [ "${{ matrix.ctlearn-version }}" = "nightly" ]; then
49+ pip install git+https://github.com/cta-observatory/dl1-data-handler.git
50+ else
51+ pip install dl1-data-handler
52+ fi
53+
54+ - name : Add MKL_THREADING_LAYER variable
55+ run : echo "MKL_THREADING_LAYER=GNU" >> $GITHUB_ENV
56+
57+ - name : Lint with flake8
58+ run : |
59+ source $HOME/miniconda/etc/profile.d/conda.sh
60+ mamba activate ctlearn
61+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
62+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
63+
64+ - name : Install package with pip
65+ run : |
66+ source $HOME/miniconda/etc/profile.d/conda.sh
67+ mamba activate ctlearn
68+ pip install -e .
69+
70+ - name : Run pytest
71+ run : |
72+ source $HOME/miniconda/etc/profile.d/conda.sh
73+ mamba activate ctlearn
74+ pytest
0 commit comments