Skip to content

Commit

Permalink
Merge pull request #914 from cta-observatory/pyflakes_first
Browse files Browse the repository at this point in the history
Run pyflakes first and only once in CI
  • Loading branch information
rlopezcoto authored Feb 17, 2022
2 parents 6c0d573 + fe50b5a commit fc418a1
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
name: CI

on: [push, pull_request]
on:
push:
branches:
- master
tags:
- '**'
pull_request:

env:
NUMBA_NUM_THREADS: 1
MPLBACKEND: Agg
PYTEST_ADDOPTS: --color=yes

jobs:
pyflakes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: pyflakes
run: |
pip install pyflakes
pyflakes lstchain
tests:
needs: pyflakes
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -46,17 +68,11 @@ jobs:
# we install ctapipe using pip to be able to select any commit, e.g. the current master
pip install \
"git+https://github.com/cta-observatory/ctapipe@$CTAPIPE_VERSION" \
pytest-cov pyflakes 'coverage!=6.3.0' pytest-xdist
pytest-cov 'coverage!=6.3.0' pytest-xdist
echo "pip install ."
pip install .
- name: pyflakes
run: |
. $CONDA/etc/profile.d/conda.sh
conda activate ci
pyflakes lstchain
- name: Download test data
env:
TEST_DATA_USER: ${{ secrets.test_data_user }}
Expand All @@ -78,6 +94,7 @@ jobs:
functionalities: gcov

docs:
needs: pyflakes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit fc418a1

Please sign in to comment.