diff --git a/.github/workflows/format_and_lint_pr.yaml b/.github/workflows/format_and_lint_pr.yaml new file mode 100644 index 000000000..e3564e376 --- /dev/null +++ b/.github/workflows/format_and_lint_pr.yaml @@ -0,0 +1,19 @@ +name: Format and lint code +on: + pull_request: +permissions: + contents: write +jobs: + format_and_lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Run Black + uses: psf/black@stable + - name: Run Flake8 + run: flake8 . diff --git a/.github/workflows/format_and_lint.yaml b/.github/workflows/format_and_lint_push.yaml similarity index 98% rename from .github/workflows/format_and_lint.yaml rename to .github/workflows/format_and_lint_push.yaml index dc7bce268..6bf9fb380 100644 --- a/.github/workflows/format_and_lint.yaml +++ b/.github/workflows/format_and_lint_push.yaml @@ -1,7 +1,6 @@ name: Format and lint code on: push: - pull_request: permissions: contents: write jobs: