Skip to content

Commit

Permalink
ci: Create CI workflow to check formatting and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Jul 26, 2024
1 parent 20646f4 commit 43f9758
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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

0 comments on commit 43f9758

Please sign in to comment.