diff --git a/.github/workflows/pr_audit.yml b/.github/workflows/pr_audit.yml new file mode 100644 index 0000000..a912153 --- /dev/null +++ b/.github/workflows/pr_audit.yml @@ -0,0 +1,37 @@ +name: PR Audit + +on: [pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Check code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install tools + run: | + pip install flake8 black isort reviewdog + + - name: Run flake8 for linting + uses: reviewdog/action-flake8@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN}} + reporter: github-pr-review + level: warning + fail_on_error: true + filter_mode: diff_context + + - name: Run Black + run: black . --check + + - name: Run isort + run: isort . --check-only + +