Repository navigation
49 lines (45 loc) · 1.73 KB
/
Copy pathpythonpackage.yml
File metadata and controls
49 lines (45 loc) · 1.73 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
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-24.04
env:
# every C build in the repo (meson, forth/Makefile, regexp tests) honors $CC
CC: clang
strategy:
max-parallel: 4
matrix:
python-version: [3.13, 3.14]
steps:
- uses: actions/checkout@v7
with:
# regexp/test_regexp.py builds jonesforth.S from the submodule
submodules: true
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# v7 defaults to true, which discards the downloaded wheel cache
# (ziglang is 93MiB) before saving, forcing a re-download every run
prune-cache: false
python-version: ${{ matrix.python-version }}
# progress/ (zig build, ~1 min) is not needed by any test, and neither is
# the 93MB ziglang wheel: no test shells out to zig
- run: uv sync --no-install-package ziglang -C setup-args=-Dprogress=false
- uses: astral-sh/ruff-action@v4.1.0
with:
version: "latest"
- run: uvx ruff check
- run: uvx ty check --python .venv
# clang's -m32 still takes its 32-bit libgcc and headers from gcc-multilib
- run: sudo apt-get install -y --no-install-recommends gcc-multilib
# a re-sync would drop -Dprogress=false
- run: uv run --no-sync pytest --cov --cov-report=xml
env:
pytest_github_report: true
- uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
# pin the upload target explicitly: CODECOV_TOKEN has previously been
# scoped to the wrong repo (jburgy/jburgy) on codecov.io, silently
# uploading coverage there instead of here
slug: jburgy/blog