From ab6605aee23ed2c70c38bd5b9f50a6395ac3f2e1 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Thu, 30 Sep 2021 21:04:22 +0200 Subject: [PATCH] add pep8 to github workflow Change-Id: I579e914e7bea38f73304f4d624649f09554ab21c --- .github/workflows/run-on-pr.yaml | 32 +++++++++++++++++++++++++++++++ .github/workflows/run-test.yaml | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml index 5d23818b32..afa2066666 100644 --- a/.github/workflows/run-on-pr.yaml +++ b/.github/workflows/run-on-pr.yaml @@ -85,6 +85,38 @@ jobs: - name: Run tests run: tox -e mypy ${{ matrix.pytest-args }} + run-pep8: + name: pep8-${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + # run this job using this matrix, excluding some combinations below. + matrix: + os: + - "ubuntu-latest" + python-version: + - "3.9" + + fail-fast: false + + # steps to run in each job. Some are github actions, others run shell commands + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade tox setuptools + pip list + + - name: Run tests + run: tox -e pep8 # Arm emulation is quite slow (~20min) so for now just run it when merging to master # run-test-arm64: diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index 0d9a8e9ed5..eae148d5f8 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -162,3 +162,36 @@ jobs: - name: Run tests run: tox -e mypy ${{ matrix.pytest-args }} + + run-pep8: + name: pep8-${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + # run this job using this matrix, excluding some combinations below. + matrix: + os: + - "ubuntu-latest" + python-version: + - "3.9" + + fail-fast: false + + # steps to run in each job. Some are github actions, others run shell commands + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade tox setuptools + pip list + + - name: Run tests + run: tox -e pep8 -- 2.47.3