1010 - " tests/**"
1111 - " pyproject.toml"
1212 - " uv.lock"
13- - " justfile"
1413 - " nix/**"
1514 - " flake.nix"
1615 - " flake.lock"
@@ -21,47 +20,56 @@ concurrency:
2120 cancel-in-progress : true
2221
2322jobs :
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 --python ${{ matrix.python-version }} --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 ${{ matrix.python-version }} python -V
5656
57- - name : Typecheck (via just)
58- run : just typecheck
57+ - name : Lint
58+ run : uv run --python ${{ matrix.python-version }} ruff check ./src
59+
60+ - name : Typecheck
61+ run : |
62+ uv run --python ${{ matrix.python-version }} basedpyright ./src
63+
64+ - name : Check formatting
65+ run : |
66+ uv run --python ${{ matrix.python-version }} ruff format --check ./src
5967
60- - name : Test (via just)
61- run : just test
68+ - name : Test
69+ run : uv run --python ${{ matrix.python-version }} pytest -q
6270
63- - name : Coverage (via just)
64- run : just cov
71+ - name : Coverage
72+ run : uv run --python ${{ matrix.python-version }} pytest -- cov=torusdk --cov-report=term-missing --cov-report=xml
6573
6674 - name : Upload coverage XML
6775 uses : actions/upload-artifact@v4
7179
7280 - name : Enforce Towncrier fragment on PRs
7381 if : ${{ github.event_name == 'pull_request' }}
74- run : just news- check
82+ run : uv run --python ${{ matrix.python-version }} towncrier check --compare-with origin/main
7583
7684 - 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
85+ run : uv run --python ${{ matrix.python-version }} uv build
0 commit comments