Skip to content

Commit

Permalink
ci: add linting and formatting workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokamoto committed Jan 14, 2025
1 parent 1a43294 commit 4c09539
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Development
on:
pull_request:
branches:
- "**"

jobs:
lint_and_format:
name: Linting and formatting checks
uses: ./.github/workflows/lint-and-format.yml

# build:
# needs: lint_and_format
# name: Build
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

# # TODO
35 changes: 35 additions & 0 deletions .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Linting and formatting checks
on:
workflow_call:

jobs:
lint_and_format:
name: Lint and Format
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
uv sync
- name: Check for linting errors
run: |
uv run ruff check
- name: Check formatting
run: |
uv run ruff format --check

0 comments on commit 4c09539

Please sign in to comment.