From 72f2eb7203659c11c4f0703c818dcb88fe527e99 Mon Sep 17 00:00:00 2001 From: samschott Date: Fri, 20 May 2022 23:08:07 +0200 Subject: [PATCH] [CI] Run flake8 only once in CI (#892) --- .github/workflows/tests.yml | 15 +++++++++++++++ tox.ini | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a4a7513..b310ed04 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,21 @@ on: - "tests/*.py" jobs: + lint: + name: Linting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: "3.7" + - name: Install test dependencies + run: python -m pip install tox + - name: Run flake8 + run: | + tox -e flake8 + tests: name: Run tests for ${{ matrix.os }} for ${{ matrix.python }} runs-on: ${{ matrix.os }} diff --git a/tox.ini b/tox.ini index 9b170f4c..e8d33f0f 100644 --- a/tox.ini +++ b/tox.ini @@ -7,5 +7,11 @@ usedevelop = true deps = -r requirements-tests.txt commands = - python -m flake8 docs tools src tests python -bb -m pytest {posargs} + +[testenv:flake8] +usedevelop = true +deps = + -r requirements-tests.txt +commands = + python -m flake8 docs tools src tests