-
Notifications
You must be signed in to change notification settings - Fork 39
42 lines (32 loc) · 1.02 KB
/
format_and_lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# We use "ruff" for linting and formatting
name: Format and Lint
on:
push:
pull_request:
branches: [main]
jobs:
format_and_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.22"
- name: Download go misspell
run: go install github.com/client9/misspell/cmd/misspell@latest
- name: Run misspell
run: misspell -error .
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
run: uv python install
- name: Install the project
run: uv tool install ruff
- name: Lint with ruff
run: |
uvx ruff check --select I .
- name: Format with ruff
run: |
uvx ruff format --check .