✨ python 3.12 #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
pull_request: | |
branches: ["**"] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ matrix.python }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Set up Github Workspace | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python Environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Hatch | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install -q hatch pre-commit | |
hatch --version | |
- name: Create Environment | |
run: hatch env create lint | |
- name: Lint | |
id: lint | |
continue-on-error: true | |
run: | | |
echo "::add-matcher::.github/workflows/matchers/flake8.json" | |
hatch run lint:style | |
echo "::remove-matcher owner=flake8::" | |
- name: Type Checking | |
id: check | |
continue-on-error: true | |
run: | | |
echo "::add-matcher::.github/workflows/matchers/mypy.json" | |
hatch run lint:typing | |
echo "::remove-matcher owner=mypy::" | |
- name: Raise Errors For Failures | |
if: | | |
steps.lint.outcome != 'success' || | |
steps.check.outcome != 'success' | |
run: | | |
echo "Lint: ${{ steps.lint.outcome }}" | |
echo "Check: ${{ steps.check.outcome }}" | |
exit 1 |