From 743dee19b6a9bb57213d5d9d5a7832b521460dc3 Mon Sep 17 00:00:00 2001 From: Dimitri Merejkowsky Date: Sat, 3 Apr 2021 15:49:33 +0200 Subject: [PATCH] Replace lint.sh with invoke --- .github/workflows/linters.yml | 5 ++++- CONTRIBUTING.md | 2 +- tasks.py | 16 ++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 689ed997..f3b00c8e 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -26,4 +26,7 @@ jobs: python -m poetry install - name: Run linters - run: ./lint.sh + run: python -m poetry run invoke lint + + - name: Check that doc builds without warnings + run: python -m poetry run mkdocs build diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5904e18e..26f2b1a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,7 +55,7 @@ $ poetry install * Run linters and tests: ```console -$ ./lint.sh +$ poetry run invoke lint $ poetry run pytest -n auto ``` diff --git a/tasks.py b/tasks.py index f399abf7..7aa0b5c2 100644 --- a/tasks.py +++ b/tasks.py @@ -41,10 +41,18 @@ def mypy(c, machine_readable=False): @task def test(c): - c.run("pytest") - - -@task(pre=[call(black, check=True), call(isort, check=True), call(flake8), call(mypy)]) + print("Running pytest") + c.run("pytest -n auto") + + +@task( + pre=[ + call(black, check=True), + call(isort, check=True), + call(flake8), + call(mypy), + ] +) def lint(c): pass