From 4ab97ec910f7b9bc9adac59de83a652f9bad8e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Mar=C3=ADa=20Mart=C3=ADnez=20G=C3=B3mez?= Date: Wed, 15 Jul 2020 10:46:19 +0200 Subject: [PATCH] ci: Add GitHub action for style checkers Run isort and black for every pull request or push. --- .github/workflows/tests.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..3427cc0a --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,25 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + code_style: + runs-on: ubuntu-latest + steps: + - name: Checkout capa + uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: pip install 'isort==5.*' black + - name: Lint with isort + run: isort --profile black --length-sort --line-width 120 -c . + - name: Lint with black + run: black -l 120 --check . +