-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.16 KB
/
quality.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
43
44
45
46
47
48
49
50
51
name: Code Quality
on:
pull_request:
branches:
- main
jobs:
quality:
name: Code Quality Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Rust checks
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Check code formatting
run: cargo fmt --all -- --check
- name: Check clippy
run: cargo clippy --all-features --tests -- -D warnings
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features --features native-tls,postgres
- name: Run sqlx prepare
run: cargo sqlx prepare --workspace --check
env:
SQLX_OFFLINE: true
# Python checks
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Check Python formatting
run: |
cd client_sdks/python
uv tool run ruff format --check .
- name: Run Python linter
run: |
cd client_sdks/python
uv tool run ruff check .