From 83befd868f40c99c402494c4bef133be6abbec5f Mon Sep 17 00:00:00 2001 From: Gertjan Bisschop Date: Thu, 6 Jul 2023 21:19:28 +0100 Subject: [PATCH] add linting to tests --- .github/workflows/tests.yml | 13 +++++++++++++ .pre-commit-config.yaml | 4 ++-- setup.py | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0945e9..9d655c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,19 @@ on: branches: [main] jobs: + pre-commit: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - uses: pre-commit/action@v3.0.0 test: name: Python runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54f10ef..6019138 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: hooks: - id: reorder-python-imports args: [--application-directories=python, - --unclassifiable-application-module=_tskit] + ] - repo: https://github.com/asottile/pyupgrade rev: v3.2.2 hooks: @@ -36,4 +36,4 @@ repos: - id: blacken-docs args: [--skip-errors] additional_dependencies: [black==22.3.0] - language_version: python3 \ No newline at end of file + language_version: python3 \ No newline at end of file diff --git a/setup.py b/setup.py index 4a15e68..1abbd06 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ import setuptools if __name__ == "__main__": - setuptools.setup() \ No newline at end of file + setuptools.setup()