Skip to content

Commit b5d7132

Browse files
committed
fix: Fix CI
1 parent 28589a6 commit b5d7132

File tree

2 files changed

+28
-38
lines changed

2 files changed

+28
-38
lines changed

.github/workflows/check-code.yml

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
- "tests/**"
1111
- "pyproject.toml"
1212
- "uv.lock"
13-
- "justfile"
1413
- "nix/**"
1514
- "flake.nix"
1615
- "flake.lock"
@@ -21,47 +20,51 @@ concurrency:
2120
cancel-in-progress: true
2221

2322
jobs:
24-
build-test:
23+
check-code:
2524
# Ubicloud managed runner
2625
runs-on: ubicloud-standard-2
2726

2827
strategy:
2928
fail-fast: false
3029
matrix:
31-
python-version: ["3.10", "3.13"]
30+
python-version: ["3.10", "3.12"]
3231

3332
steps:
3433
- name: Checkout
3534
uses: actions/checkout@v4
3635

36+
- name: "Set up Python"
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
3741
- name: Setup uv (with caching)
3842
uses: astral-sh/setup-uv@v6
3943
with:
4044
enable-cache: true
4145
ignore-nothing-to-cache: true
4246

43-
- name: Install Python ${{ matrix.python-version }}
44-
run: uv python install ${{ matrix.python-version }}
45-
46-
- name: Install just
47-
run: |
48-
sudo apt-get update
49-
sudo apt-get install -y just
47+
- name: Create venv for ${{ matrix.python-version }}
48+
run: uv venv --python ${{ matrix.python-version }}
5049

5150
- name: Sync dependencies
52-
run: uv sync
51+
run: uv sync --frozen
5352

54-
- name: Lint & Format (via just)
55-
run: just lint
53+
# Optional: prove we're using the right interpreter
54+
- name: Show Python used by uv
55+
run: uv run python -V
5656

57-
- name: Typecheck (via just)
58-
run: just typecheck
57+
- name: Lint & Format
58+
run: |
59+
uv run ruff format --check ./src
60+
uv run ruff check ./src
61+
uv run basedpyright ./src
5962
60-
- name: Test (via just)
61-
run: just test
63+
- name: Test
64+
run: uv run pytest -q
6265

63-
- name: Coverage (via just)
64-
run: just cov
66+
- name: Coverage
67+
run: uv run pytest --cov=torusdk --cov-report=term-missing --cov-report=xml
6568

6669
- name: Upload coverage XML
6770
uses: actions/upload-artifact@v4
@@ -71,21 +74,7 @@ jobs:
7174

7275
- name: Enforce Towncrier fragment on PRs
7376
if: ${{ github.event_name == 'pull_request' }}
74-
run: just news-check
77+
run: uv run towncrier check --compare-with origin/main
7578

7679
- name: Build package
77-
run: just build
78-
79-
# Separate job for Nix-specific checks
80-
nix-checks:
81-
runs-on: ubicloud-standard-2
82-
83-
steps:
84-
- name: Checkout
85-
uses: actions/checkout@v4
86-
87-
- name: Install Nix
88-
uses: DeterminateSystems/nix-installer-action@main
89-
90-
- name: Check Nix flake
91-
run: nix flake check
80+
run: uv build

.github/workflows/check-nix.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ name: Nix checks
33
on:
44
pull_request:
55
push:
6-
branches: [main, dev]
6+
branches: [main, test-ci]
77

88
jobs:
9-
checks:
9+
check-nix:
1010
runs-on: ubicloud-standard-2
1111
permissions:
1212
contents: read
1313
id-token: write
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616

1717
- name: Install Nix
1818
uses: DeterminateSystems/nix-installer-action@main
19+
1920
# - uses: DeterminateSystems/magic-nix-cache-action@main
2021

2122
- name: Check health of flake.lock

0 commit comments

Comments
 (0)