-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (51 loc) · 1.96 KB
/
Copy pathci.yml
File metadata and controls
65 lines (51 loc) · 1.96 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Workspace CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
concurrency:
group: workspace-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: "3.14"
- name: Set up Rust
uses: dtolnay/rust-toolchain@1.94.0
- name: Sync development dependencies
run: uv sync --group dev
- name: Run Rust tests
run: PYO3_PYTHON="$GITHUB_WORKSPACE/.venv/bin/python3" cargo test --manifest-path rust/Cargo.toml --workspace --tests
- name: Run Python tests
run: uv run --group dev pytest json-tstring/tests toml-tstring/tests yaml-tstring/tests -q
- name: Check formatting
run: uv run --group dev ruff format --check json-tstring toml-tstring yaml-tstring tstring-core rust/python-bindings/python
- name: Run Ruff
run: uv run --group dev ruff check json-tstring/src toml-tstring/src yaml-tstring/src tstring-core/src rust/python-bindings/python/tstring_bindings
- name: Run type checks
run: uv run --group dev ty check json-tstring/src json-tstring/tests toml-tstring/src toml-tstring/tests yaml-tstring/src yaml-tstring/tests tstring-core/src rust/python-bindings/python
- name: Build distributions
run: |
uv build tstring-core --out-dir dist
uv build json-tstring --out-dir dist
uv build toml-tstring --out-dir dist
uv build yaml-tstring --out-dir dist
uv build rust/python-bindings --out-dir dist
- name: Check distribution metadata
run: uvx twine check dist/*
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: python-distributions
path: dist/*