From c5b7ea19ce9f68c2728d70cbd3e468f5d5e8e713 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 13 Jul 2021 11:13:56 +0200 Subject: [PATCH] CI: add lints --- .github/workflows/lint.yml | 8 ++++++++ .github/workflows/test.yml | 4 ++-- .pre-commit-config.yaml | 7 ++++--- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..5d7dfbf --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,8 @@ +name: Lint +on: [push, pull_request] +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: psf/black@stable diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31504e0..1e1a427 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,5 @@ -name: build docker image and run tests inside -on: push +name: Tests +on: [push, pull_request] jobs: tests: runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cab3bdf..7c917da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,10 +14,11 @@ repos: - id: flake8 - id: mixed-line-ending - id: trailing-whitespace -- repo: https://github.com/pre-commit/mirrors-yapf - rev: v0.29.0 +- repo: https://github.com/psf/black + rev: stable hooks: - - id: yapf + - id: black + language_version: python3 - repo: https://github.com/PyCQA/pydocstyle rev: 5.0.1 hooks: