diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index d4350c8..6613e9e 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -13,18 +13,22 @@ jobs: pep8: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.12 - uses: actions/setup-python@v5 + - name: Check out repository + uses: actions/checkout@v4 with: - python-version: 3.12 - - name: Install Python dependencies - run: | - python -m pip install poetry - poetry install --sync --with dev - - name: Lint with flake8 - run: | - poetry run flake8 . --count + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: autopep8 + id: autopep8 + uses: j-z10/autopep8@669deac37f8d1de9629679e31ba700a35eebd042 + with: + args: --exit-code --recursive --in-place . + - name: Fail if autopep8 detected issues + if: steps.autopep8.outputs.exit-code == 2 + uses: actions/github-script@v7 + with: + script: | + core.setFailed('Code style issues found.') test: needs: pep8