linting #55
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.13" | |
- name: install dependencies | |
run: pip install ".[style]" | |
- name: run format | |
run: ./scripts/format.sh | |
lint: | |
needs: [format] | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install python3.10.13 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10.13" | |
- name: install dependencies | |
run: pip install ".[style]" | |
- name: run lint | |
run: ./scripts/lint.sh |