Skip to content

Format with black. #577

Format with black.

Format with black. #577

Workflow file for this run

name: CI
on: [push, pull_request]
env:
NUMBA_NUM_THREADS: 1
MPLBACKEND: Agg
PYTEST_ADDOPTS: --color=yes
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
ctapipe-version: [v0.12.0]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
PYTHON_VERSION: ${{ matrix.python-version }}
CTAPIPE_VERSION: ${{ matrix.ctapipe-version }}
run: |
. $CONDA/etc/profile.d/conda.sh
conda config --set always_yes yes --set changeps1 no
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml
conda install mamba -n base -c conda-forge
mamba env create -n ci -f environment.yml
conda activate ci
# 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: Static codechecks
# need to use a login shell for the conda setup to work
shell: bash -leo pipefail {0}
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate ci
pyflakes magicctapipe
#- 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
# run: |
# # github actions starts a new shell for each "step", so we need to
# # activate our env again
# source $CONDA/etc/profile.d/conda.sh
# conda activate ci
# coverage run -m pytest -v
# coverage xml
#- uses: codecov/codecov-action@v1