ci: Create CI workflow to check formatting and linting #1
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: Check formatting and linting | |
on: push | |
jobs: | |
check_formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Create and activate venv | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
- name: Install dependencies | |
run: pip install tan ruff | |
- name: Cache venv | |
uses: actions/cache@v3 | |
with: | |
path: ./.venv | |
key: venv-${{ runner.os }} | |
- name: Run formatter | |
run: | | |
poetry run tan --check . --use-tabs --line-length 120 --verbose | |
- name: Run linter | |
run: | | |
poetry run ruff check . --ignore E402 --ignore F405 --ignore F403 |