From bc8ca8edbcb1f78037ffa29d4e9d235aba10172a Mon Sep 17 00:00:00 2001 From: jlenain Date: Thu, 27 Jul 2023 11:01:09 +0200 Subject: [PATCH] Use pre-commit action directly to run flake8 and black, instead of flake8 action. --- .github/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f0b6849..dbe7db20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ env: PYTEST_ADDOPTS: --color=yes jobs: - flake8-lint: + lint: runs-on: ubuntu-latest name: Lint steps: @@ -23,19 +23,22 @@ jobs: - name: Set up Python environment uses: actions/setup-python@v4 with: - python-version: "3.8" - - name: flake8 Lint - uses: py-actions/flake8@v2 + python-version: "3.9" + - name: Runs pre-commit hooks + uses: pre-commit/action@v3.0.0 + with: + extra_args: --files $(git diff origin/main --name-only) tests: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", 3.11] + python-version: ["3.8", "3.9", "3.10", "3.11"] ctapipe-version: [v0.19.1] defaults: run: + # We need login shells (-l) for micromamba to work. shell: bash -leo pipefail {0} steps: