diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..1a8ad35 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,32 @@ +name: Linting +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: get code + uses: actions/checkout@v4 + - name: install poetry + run: pipx install poetry + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "poetry" + - name: install deps + run: | + poetry env use "3.10" + poetry install --no-interaction + - name: Install pre-commit + shell: bash + run: poetry run pip install pre-commit + - name: lint and format + run: | + poetry run make lint