Update ci.yml #860
Workflow file for this run
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 | |
on: [push, pull_request] | |
env: | |
NUMBA_NUM_THREADS: 1 | |
MPLBACKEND: Agg | |
PYTEST_ADDOPTS: --color=yes | |
jobs: | |
pyflakes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: pyflakes | |
run: | | |
pip install pyflakes | |
pyflakes magicctapipe | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
ctapipe-version: [v0.12.0] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Prepare mamba installation | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
run: | | |
# setup correct python version | |
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml | |
- name: mamba setup | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
environment-name: "ci" | |
cache-downloads: true | |
- name: Install dependencies | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
CTAPIPE_VERSION: ${{ matrix.ctapipe-version }} | |
run: | | |
# we install ctapipe using pip to be able to select any commit, e.g. the current master | |
pip install pytest-cov "git+https://github.com/cta-observatory/ctapipe@$CTAPIPE_VERSION" | |
pip install pyflakes | |
pip install -e . | |
git describe --tags | |
#- name: Download test data | |
# env: | |
# TEST_DATA_USER: ${{ secrets.test_data_user }} | |
# TEST_DATA_PASSWORD: ${{ secrets.test_data_password }} | |
# run: | | |
# chmod +x ./download_test_data.sh | |
# ./download_test_data.sh | |
- name: Tests | |
env: | |
MAGIC_CTA_DATA_USER: ${{ secrets.magic_cta_data_user }} | |
MAGIC_CTA_DATA_PASSWORD: ${{ secrets.magic_cta_data_password }} | |
run: | | |
# github actions starts a new shell for each "step", so we need to | |
# activate our env again | |
coverage run -m pytest -v | |
coverage xml | |
- uses: codecov/codecov-action@v3 |