linting #46
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 | |
run-name: linting | |
on: | |
push: | |
branches: [main] | |
paths: ["src/**", "tests/**"] | |
pull_request: | |
types: [opened] | |
paths: ["src/**", "tests/**"] | |
workflow_dispatch: | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install python3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install dependencies | |
run: pipx install poetry && poetry install | |
- name: run format | |
run: poetry run ./scripts/format.sh | |
lint: | |
needs: [format] | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install python3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: install dependencies | |
run: pipx install poetry && poetry install | |
- name: run lint | |
run: poetry run ./scripts/lint.sh |