testudos 0.65.2__tar.gz → 0.65.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {testudos-0.65.2 → testudos-0.65.4}/.github/dependabot.yml +5 -3
- {testudos-0.65.2 → testudos-0.65.4}/.github/workflows/ci.yml +60 -112
- testudos-0.65.4/.github/workflows/install-check.yml +87 -0
- {testudos-0.65.2 → testudos-0.65.4}/.github/workflows/python-publish.yml +6 -33
- {testudos-0.65.2 → testudos-0.65.4}/.github/workflows/security.yml +6 -10
- {testudos-0.65.2 → testudos-0.65.4}/.github/workflows/testudos.yml +1 -1
- {testudos-0.65.2 → testudos-0.65.4}/CHANGELOG.md +35 -0
- {testudos-0.65.2 → testudos-0.65.4}/CLAUDE.md +12 -5
- {testudos-0.65.2 → testudos-0.65.4}/PKG-INFO +1 -1
- {testudos-0.65.2 → testudos-0.65.4}/action.yml +2 -2
- {testudos-0.65.2 → testudos-0.65.4}/docs/ARCHITECTURE.md +11 -8
- {testudos-0.65.2 → testudos-0.65.4}/pyproject.toml +1 -1
- testudos-0.65.4/scripts/install_check.sh +41 -0
- testudos-0.65.4/uv.lock +638 -0
- testudos-0.65.2/.github/workflows/install-check.yml +0 -80
- testudos-0.65.2/uv.lock +0 -568
- {testudos-0.65.2 → testudos-0.65.4}/.github/build-constraints.txt +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/.github/smoke-project/pyproject.toml +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/.github/smoke-project/src/smoke/__init__.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/.github/smoke-project/tests/test_smoke.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/.github/workflows/release.yml +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/.github/workflows/update-fallback-versions.yml +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/.gitignore +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/.testudos/coverage/coveragerc +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/LICENSE +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/README.md +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/docs/STABILITY.md +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/docs/workflow-templates/testudos.properties.json +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/docs/workflow-templates/testudos.yml +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/justfile +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/scripts/check_version_bump.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/scripts/update_fallback_versions.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/__init__.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/_rcfile.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/cli.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/cli_common.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/config.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/coverage.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/coverage_cli.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/cpus.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/executor.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/github.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/junit.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/multi_cli.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/multi_runner.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/output.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/plan.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/process.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/python_version.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/runner.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/tools.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/ui.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/versions.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/src/testudos/workspace.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/conftest.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/stable_surface.json +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_check_version_bump.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_cli.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_config.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_coverage.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_coverage_cli.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_coverage_source.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_dependency_installation.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_docs.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_executor.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_github.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_import_graph.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_index_configuration.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_integration.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_junit.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_multi_cli.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_multi_package_ui.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_multi_runner.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_output.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_public_api.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_python_version.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_release_pins.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_stability.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_timeout.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_tools.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_ui.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_untested_floor.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_update_fallback_versions.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_versions.py +0 -0
- {testudos-0.65.2 → testudos-0.65.4}/tests/test_workspace.py +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
# Action pins are commit SHAs, which nothing bumps by hand reliably: a
|
|
2
|
-
# PR moves them to the newest releases (#260).
|
|
1
|
+
# Action pins are commit SHAs, which nothing bumps by hand reliably: a monthly
|
|
2
|
+
# PR moves them to the newest releases (#260). Monthly because each PR costs a
|
|
3
|
+
# full CI run, and a vulnerable action is raised by Dependabot security updates
|
|
4
|
+
# whenever it is published, whatever this schedule says.
|
|
3
5
|
#
|
|
4
6
|
# uv.lock: a weekly PR moves the locked versions to the newest within
|
|
5
7
|
# pyproject.toml's ranges, without raising those ranges (lowest-direct in
|
|
@@ -11,7 +13,7 @@ updates:
|
|
|
11
13
|
- package-ecosystem: github-actions
|
|
12
14
|
directory: /
|
|
13
15
|
schedule:
|
|
14
|
-
interval:
|
|
16
|
+
interval: monthly
|
|
15
17
|
groups:
|
|
16
18
|
actions:
|
|
17
19
|
patterns: ["*"]
|
|
@@ -28,26 +28,36 @@ on:
|
|
|
28
28
|
# instead -- the same workaround release.yml uses to start publishing.
|
|
29
29
|
workflow_dispatch:
|
|
30
30
|
|
|
31
|
+
# On a push to main -- a squash merge of a pull request whose run tested the same
|
|
32
|
+
# code -- only Checks runs: enough to catch two merged changes that conflict in
|
|
33
|
+
# meaning, without repeating dogfood and the workflow and action runs. Nothing
|
|
34
|
+
# waits on main's run: release.yml publishes on its own.
|
|
35
|
+
#
|
|
36
|
+
# Actions bills every job rounded up to a whole minute, so seconds of work go
|
|
37
|
+
# in an existing job as steps rather than a job of their own. Branch
|
|
38
|
+
# protection requires the jobs themselves -- Checks, Self-Test (Dogfooding),
|
|
39
|
+
# Reusable workflow (fan-out) / Result and Composite action -- rather than an
|
|
40
|
+
# aggregating job, which cost a billed minute for a few seconds on every run.
|
|
41
|
+
|
|
31
42
|
# Cancel in-progress runs for the same branch
|
|
32
43
|
concurrency:
|
|
33
44
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
34
45
|
cancel-in-progress: true
|
|
35
46
|
|
|
36
47
|
jobs:
|
|
37
|
-
# Lint, type-check, the
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
48
|
+
# Lint, type-check, the suite with its coverage gate, the network tests, the
|
|
49
|
+
# vulnerability scan and the version check: one job, so checkout, uv and
|
|
50
|
+
# `uv sync` are paid once. They stay separate *steps*, which is what makes a
|
|
51
|
+
# failure name its own cause, and a lint failure still stops before the
|
|
52
|
+
# suite runs.
|
|
42
53
|
checks:
|
|
43
54
|
name: Checks
|
|
44
55
|
runs-on: ubuntu-latest
|
|
45
56
|
steps:
|
|
46
57
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
47
58
|
with:
|
|
48
|
-
# The version check diffs against origin/main
|
|
49
|
-
#
|
|
50
|
-
# size -- far less than the separate job it replaces.
|
|
59
|
+
# The version check diffs against origin/main. It costs a second on
|
|
60
|
+
# a repo this size.
|
|
51
61
|
fetch-depth: 0
|
|
52
62
|
|
|
53
63
|
- name: Install uv
|
|
@@ -55,13 +65,17 @@ jobs:
|
|
|
55
65
|
with:
|
|
56
66
|
enable-cache: true
|
|
57
67
|
|
|
68
|
+
# 3.11 because it is the floor `requires-python` admits, so it is where
|
|
69
|
+
# a new-syntax slip shows up first. Every other supported version runs
|
|
70
|
+
# the same suite in dogfood, on every pull request, which reports a
|
|
71
|
+
# version-specific failure in its own results table.
|
|
58
72
|
- name: Set up Python
|
|
59
|
-
run: uv python install 3.
|
|
73
|
+
run: uv python install 3.11
|
|
60
74
|
|
|
61
75
|
- name: Install dependencies
|
|
62
76
|
# --locked: a uv.lock that no longer matches pyproject.toml fails here,
|
|
63
77
|
# rather than being re-resolved in silence and tested as if committed.
|
|
64
|
-
run: uv sync --locked --extra dev
|
|
78
|
+
run: uv sync --locked --extra dev --python 3.11
|
|
65
79
|
|
|
66
80
|
- name: Run ruff check
|
|
67
81
|
run: uv run ruff check src tests
|
|
@@ -72,6 +86,20 @@ jobs:
|
|
|
72
86
|
- name: Run mypy
|
|
73
87
|
run: uv run mypy src
|
|
74
88
|
|
|
89
|
+
# Fewer workers *because* of coverage, not despite it: pytest-cov writes
|
|
90
|
+
# one data file per worker and combines them at the end, so 24 of them
|
|
91
|
+
# cost more to merge than they save in test time (64s at -n 24 against
|
|
92
|
+
# 49s at -n 16, measured on the runner). Over-subscribed at all because
|
|
93
|
+
# the suite is sleep-bound: the timeout and process-tree tests wait on
|
|
94
|
+
# real clocks.
|
|
95
|
+
#
|
|
96
|
+
# --cov-fail-under is the gate; term-missing is what a human reads in
|
|
97
|
+
# the log. Nothing consumes an xml report. Codecov would need
|
|
98
|
+
# CODECOV_TOKEN, the xml report and `fail_ci_if_error: true`, so that a
|
|
99
|
+
# failing upload cannot pass as success.
|
|
100
|
+
- name: Run tests with coverage
|
|
101
|
+
run: uv run pytest -n 8 --cov=src/testudos --cov-report=term-missing --cov-fail-under=80
|
|
102
|
+
|
|
75
103
|
# Deselected from the default suite: these really run `uv`, which
|
|
76
104
|
# resolves packages from PyPI in a subprocess, or call the live
|
|
77
105
|
# endoflife.date API. Kept as their own step so an index or API outage
|
|
@@ -80,6 +108,13 @@ jobs:
|
|
|
80
108
|
- name: Run tests that reach the network
|
|
81
109
|
run: uv run pytest -m network -v
|
|
82
110
|
|
|
111
|
+
# Known vulnerabilities in uv.lock. security.yml keeps the weekly scan.
|
|
112
|
+
- name: Run OSV Scanner
|
|
113
|
+
uses: google/osv-scanner-action/osv-scanner-action@b1d267aea5211fa648d9d442fa64b90dbdcbdd36 # v2.7.0
|
|
114
|
+
with:
|
|
115
|
+
scan-args: |-
|
|
116
|
+
--lockfile=uv.lock
|
|
117
|
+
|
|
83
118
|
# Last, and only for changes headed to main -- a pull request, or a
|
|
84
119
|
# dispatched run on a branch: a missing changelog entry is a policy
|
|
85
120
|
# gate, and seeing it before the lint and type errors above would bury
|
|
@@ -88,68 +123,10 @@ jobs:
|
|
|
88
123
|
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main')
|
|
89
124
|
run: uv run scripts/check_version_bump.py
|
|
90
125
|
|
|
91
|
-
test:
|
|
92
|
-
name: Test (Python ${{ matrix.python-version }})
|
|
93
|
-
needs: checks
|
|
94
|
-
runs-on: ubuntu-latest
|
|
95
|
-
strategy:
|
|
96
|
-
fail-fast: false
|
|
97
|
-
matrix:
|
|
98
|
-
# One version here, not four. Testing only the oldest on PRs was tried
|
|
99
|
-
# once before and reverted, because version-specific regressions
|
|
100
|
-
# reached main unseen -- so the reason it is safe now matters: the
|
|
101
|
-
# dogfood job below runs the same suite on every supported version on
|
|
102
|
-
# every pull request, a superset of the matrix this replaces. Nothing stops
|
|
103
|
-
# being tested; a version-specific failure is reported by dogfood,
|
|
104
|
-
# naming the version in its own results table, rather than by four
|
|
105
|
-
# jobs that each pay a billed minute to repeat the others.
|
|
106
|
-
#
|
|
107
|
-
# 3.11 is the one kept because it is the floor `requires-python`
|
|
108
|
-
# admits, so it is where a new-syntax slip shows up first. If this
|
|
109
|
-
# ever needs to be a real matrix again, add versions back here and
|
|
110
|
-
# move the coverage flags onto whichever one uploads.
|
|
111
|
-
python-version: ["3.11"]
|
|
112
|
-
steps:
|
|
113
|
-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
114
|
-
|
|
115
|
-
- name: Install uv
|
|
116
|
-
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
117
|
-
with:
|
|
118
|
-
enable-cache: true
|
|
119
|
-
|
|
120
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
121
|
-
run: uv python install ${{ matrix.python-version }}
|
|
122
|
-
|
|
123
|
-
- name: Install dependencies
|
|
124
|
-
# --locked: a uv.lock that no longer matches pyproject.toml fails here,
|
|
125
|
-
# rather than being re-resolved in silence and tested as if committed.
|
|
126
|
-
run: uv sync --locked --extra dev
|
|
127
|
-
|
|
128
|
-
# Fewer workers *because* of coverage, not despite it: pytest-cov writes
|
|
129
|
-
# one data file per worker and combines them at the end, so 24 of them
|
|
130
|
-
# cost more to merge than they save in test time. Measured on the
|
|
131
|
-
# runner, this step was 64s at -n 24 against 49s at -n 16; the machine
|
|
132
|
-
# this was tuned on does not show the difference, the runner does.
|
|
133
|
-
#
|
|
134
|
-
# Over-subscribed at all because the suite is sleep-bound, not
|
|
135
|
-
# CPU-bound: 60s of wall time for 13s of CPU, since the timeout and
|
|
136
|
-
# process-tree tests wait on real clocks.
|
|
137
|
-
# --cov-fail-under is the gate; term-missing is what a human reads in
|
|
138
|
-
# the log. There is no --cov-report=xml because nothing consumes it any
|
|
139
|
-
# more: the Codecov upload that used to run here had been
|
|
140
|
-
# failing on every run with "Token required - not valid tokenless
|
|
141
|
-
# upload", and `fail_ci_if_error: false` reported that as success. No
|
|
142
|
-
# token, no codecov.yml, no badge, no status check -- so it was a step
|
|
143
|
-
# that looked like it worked and posted nowhere. If Codecov is ever
|
|
144
|
-
# wanted back, it needs CODECOV_TOKEN in the repo secrets, the xml
|
|
145
|
-
# report restored here, and fail_ci_if_error: true so it cannot rot
|
|
146
|
-
# silently a second time.
|
|
147
|
-
- name: Run tests with coverage
|
|
148
|
-
run: uv run pytest -n 8 --cov=src/testudos --cov-report=term-missing --cov-fail-under=80
|
|
149
|
-
|
|
150
126
|
dogfood:
|
|
151
127
|
name: Self-Test (Dogfooding)
|
|
152
|
-
needs:
|
|
128
|
+
needs: checks
|
|
129
|
+
if: github.event_name != 'push'
|
|
153
130
|
runs-on: ubuntu-latest
|
|
154
131
|
steps:
|
|
155
132
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
@@ -163,9 +140,8 @@ jobs:
|
|
|
163
140
|
run: uv sync --locked --extra dev
|
|
164
141
|
|
|
165
142
|
- name: Set up Python versions
|
|
166
|
-
# Whatever the run will resolve, asked of testudos itself
|
|
167
|
-
#
|
|
168
|
-
# reached end of life. --strict-versions fails the job rather than
|
|
143
|
+
# Whatever the run will resolve, asked of testudos itself, so the list
|
|
144
|
+
# follows endoflife.date. --strict-versions fails the job rather than
|
|
169
145
|
# install the bundled guess.
|
|
170
146
|
run: uv python install $(uv run testudos versions --format plain --strict-versions)
|
|
171
147
|
|
|
@@ -183,28 +159,17 @@ jobs:
|
|
|
183
159
|
|
|
184
160
|
# The reusable workflow other repositories call, run against this commit's
|
|
185
161
|
# testudos and the smoke project, so a change to either is exercised before
|
|
186
|
-
# anyone else's CI depends on it.
|
|
187
|
-
#
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
testudos-from: "."
|
|
194
|
-
working-directory: .github/smoke-project
|
|
195
|
-
args: |
|
|
196
|
-
--no-fail-fast
|
|
197
|
-
--coverage
|
|
198
|
-
--coverage-fail-under
|
|
199
|
-
100
|
|
200
|
-
|
|
201
|
-
# The fan-out path: a plan job running `testudos run --matrix`, a test job
|
|
202
|
-
# per version, the coverage job and the result job. The smoke project covers
|
|
203
|
-
# one branch on each side of 3.13, so each test job measures less than 100%
|
|
204
|
-
# and only the coverage job's combined report reaches it.
|
|
162
|
+
# anyone else's CI depends on it. The fan-out path covers what the default
|
|
163
|
+
# path does not share with it: a plan job running `testudos run --matrix`, a
|
|
164
|
+
# test job per version, the coverage job and the result job. The smoke
|
|
165
|
+
# project covers one branch on each side of 3.13, so each test job measures
|
|
166
|
+
# less than 100% and only the coverage job's combined report reaches it. The
|
|
167
|
+
# default path's single test job -- every version in one `testudos run`,
|
|
168
|
+
# coverage checked in the job -- is what the composite action below runs.
|
|
205
169
|
reusable-workflow-fan-out:
|
|
206
170
|
name: Reusable workflow (fan-out)
|
|
207
171
|
needs: checks
|
|
172
|
+
if: github.event_name != 'push'
|
|
208
173
|
uses: ./.github/workflows/testudos.yml
|
|
209
174
|
with:
|
|
210
175
|
testudos-from: "."
|
|
@@ -215,10 +180,12 @@ jobs:
|
|
|
215
180
|
name: fan-out
|
|
216
181
|
|
|
217
182
|
# The composite action, the way a job of the caller's own uses it: this
|
|
218
|
-
# commit's testudos, and the smoke project on both sides of 3.13
|
|
183
|
+
# commit's testudos, and the smoke project on both sides of 3.13 in one run
|
|
184
|
+
# with its coverage gate -- the reusable workflow's default test job.
|
|
219
185
|
action:
|
|
220
186
|
name: Composite action
|
|
221
187
|
needs: checks
|
|
188
|
+
if: github.event_name != 'push'
|
|
222
189
|
runs-on: ubuntu-latest
|
|
223
190
|
steps:
|
|
224
191
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
@@ -229,22 +196,3 @@ jobs:
|
|
|
229
196
|
args: --python 3.12 --python 3.13 --coverage --coverage-fail-under 100
|
|
230
197
|
- name: testudos stays on PATH
|
|
231
198
|
run: testudos versions --format plain --offline
|
|
232
|
-
|
|
233
|
-
status-check:
|
|
234
|
-
name: Status Check
|
|
235
|
-
if: always()
|
|
236
|
-
needs: [checks, test, dogfood, reusable-workflow, reusable-workflow-fan-out, action]
|
|
237
|
-
runs-on: ubuntu-latest
|
|
238
|
-
steps:
|
|
239
|
-
- name: Check all jobs passed
|
|
240
|
-
run: |
|
|
241
|
-
if [[ "${{ needs.checks.result }}" != "success" ]] || \
|
|
242
|
-
[[ "${{ needs.test.result }}" != "success" ]] || \
|
|
243
|
-
[[ "${{ needs.dogfood.result }}" != "success" ]] || \
|
|
244
|
-
[[ "${{ needs.reusable-workflow.result }}" != "success" ]] || \
|
|
245
|
-
[[ "${{ needs.reusable-workflow-fan-out.result }}" != "success" ]] || \
|
|
246
|
-
[[ "${{ needs.action.result }}" != "success" ]]; then
|
|
247
|
-
echo "One or more jobs failed"
|
|
248
|
-
exit 1
|
|
249
|
-
fi
|
|
250
|
-
echo "All jobs passed successfully"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# testudos as a user installs it: the built wheel, with its declared dependency
|
|
2
|
+
# ranges resolved against today's index rather than uv.lock.
|
|
3
|
+
#
|
|
4
|
+
# Everything else in CI installs from the lockfile, so it cannot see a new
|
|
5
|
+
# release of a dependency breaking testudos (typer 0.26 dropping click, #243)
|
|
6
|
+
# or a floor in pyproject.toml that no longer works. `highest` catches the
|
|
7
|
+
# first, `lowest-direct` the second. `highest` is also what the reusable
|
|
8
|
+
# workflow installs, as of the release's upload. It runs weekly as well because
|
|
9
|
+
# upstream drift needs no commit here, and python-publish.yml calls it before
|
|
10
|
+
# anything reaches PyPI.
|
|
11
|
+
#
|
|
12
|
+
# Called by python-publish.yml with `upload-dists`, it also keeps the sdist
|
|
13
|
+
# and wheel it built for publishing, so what reaches PyPI is exactly what was
|
|
14
|
+
# installed and run here -- and the release needs no build job of its own.
|
|
15
|
+
#
|
|
16
|
+
# One job, both resolutions in turn: each takes about 20s, and Actions bills a
|
|
17
|
+
# job rounded up to a whole minute, so two jobs cost twice as much for the same
|
|
18
|
+
# work. A failure still names its resolution: each has its own steps.
|
|
19
|
+
|
|
20
|
+
name: Install check
|
|
21
|
+
|
|
22
|
+
on:
|
|
23
|
+
pull_request:
|
|
24
|
+
branches: [main]
|
|
25
|
+
# What reaches the wheel or the smoke test; a docs-only change cannot
|
|
26
|
+
# break an install.
|
|
27
|
+
paths:
|
|
28
|
+
- 'src/**'
|
|
29
|
+
- 'pyproject.toml'
|
|
30
|
+
- '.github/build-constraints.txt'
|
|
31
|
+
- '.github/smoke-project/**'
|
|
32
|
+
- '.github/workflows/install-check.yml'
|
|
33
|
+
- 'scripts/install_check.sh'
|
|
34
|
+
schedule:
|
|
35
|
+
- cron: "23 4 * * 1"
|
|
36
|
+
workflow_call:
|
|
37
|
+
inputs:
|
|
38
|
+
upload-dists:
|
|
39
|
+
description: Keep the built sdist and wheel as the `release-dists` artifact
|
|
40
|
+
type: boolean
|
|
41
|
+
default: false
|
|
42
|
+
workflow_dispatch:
|
|
43
|
+
|
|
44
|
+
permissions:
|
|
45
|
+
contents: read
|
|
46
|
+
|
|
47
|
+
# A newer push to the same pull request supersedes the run in progress.
|
|
48
|
+
concurrency:
|
|
49
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
50
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
51
|
+
|
|
52
|
+
jobs:
|
|
53
|
+
install:
|
|
54
|
+
name: Install check
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
timeout-minutes: 20
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
59
|
+
|
|
60
|
+
- name: Install uv
|
|
61
|
+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
62
|
+
|
|
63
|
+
# Every input to the build is pinned: the interpreter, and the build
|
|
64
|
+
# backend and everything it pulls in, by hash. Regenerate the
|
|
65
|
+
# constraints when hatchling's pin in pyproject.toml changes:
|
|
66
|
+
# echo "hatchling==X.Y.Z" | uv pip compile --generate-hashes --universal \
|
|
67
|
+
# --python-version 3.11 -o .github/build-constraints.txt -
|
|
68
|
+
# The wheel is built from the sdist, as PyPI's users would build it.
|
|
69
|
+
- name: Build the sdist and wheel
|
|
70
|
+
run: >-
|
|
71
|
+
uv build --python 3.13 --out-dir dist
|
|
72
|
+
--build-constraint .github/build-constraints.txt --require-hashes
|
|
73
|
+
|
|
74
|
+
# Both run whatever happened to the other, so one run reports both.
|
|
75
|
+
- name: Install and run it (highest, Python 3.13)
|
|
76
|
+
run: scripts/install_check.sh highest 3.13
|
|
77
|
+
|
|
78
|
+
- name: Install and run it (lowest-direct, Python 3.11)
|
|
79
|
+
if: ${{ !cancelled() }}
|
|
80
|
+
run: scripts/install_check.sh lowest-direct 3.11
|
|
81
|
+
|
|
82
|
+
- name: Keep the distributions for publishing
|
|
83
|
+
if: inputs.upload-dists
|
|
84
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
85
|
+
with:
|
|
86
|
+
name: release-dists
|
|
87
|
+
path: dist/
|
|
@@ -28,45 +28,18 @@ permissions:
|
|
|
28
28
|
contents: read
|
|
29
29
|
|
|
30
30
|
jobs:
|
|
31
|
-
release
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
36
|
-
|
|
37
|
-
- name: Install uv
|
|
38
|
-
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
39
|
-
|
|
40
|
-
# Every input to the build is pinned: the interpreter, and the build
|
|
41
|
-
# backend and everything it pulls in, by hash. This step used to install
|
|
42
|
-
# an unpinned `build` on whatever Python "3.x" meant that day, which then
|
|
43
|
-
# resolved an unpinned hatchling -- the one link in the release path a
|
|
44
|
-
# newly published (or compromised) package could reach. Regenerate the
|
|
45
|
-
# constraints when hatchling's pin in pyproject.toml changes:
|
|
46
|
-
# echo "hatchling==X.Y.Z" | uv pip compile --generate-hashes --universal \
|
|
47
|
-
# --python-version 3.11 -o .github/build-constraints.txt -
|
|
48
|
-
- name: Build release distributions
|
|
49
|
-
run: >-
|
|
50
|
-
uv build --python 3.13
|
|
51
|
-
--build-constraint .github/build-constraints.txt --require-hashes
|
|
52
|
-
|
|
53
|
-
- name: Upload distributions
|
|
54
|
-
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
55
|
-
with:
|
|
56
|
-
name: release-dists
|
|
57
|
-
path: dist/
|
|
58
|
-
|
|
59
|
-
# The wheel installed as a user installs it -- dependency ranges resolved
|
|
60
|
-
# fresh, highest and lowest -- and run end to end. Everything else in CI
|
|
61
|
-
# installs from uv.lock, which is how a release that crashed on import
|
|
62
|
-
# reached PyPI (#243).
|
|
31
|
+
# The release distributions, built once and installed as a user installs
|
|
32
|
+
# them -- dependency ranges resolved fresh, highest and lowest -- and run end
|
|
33
|
+
# to end before anything is published. Everything else in CI installs from
|
|
34
|
+
# uv.lock, which is how a release that crashed on import reached PyPI (#243).
|
|
63
35
|
install-check:
|
|
64
36
|
uses: ./.github/workflows/install-check.yml
|
|
37
|
+
with:
|
|
38
|
+
upload-dists: true
|
|
65
39
|
|
|
66
40
|
pypi-publish:
|
|
67
41
|
runs-on: ubuntu-latest
|
|
68
42
|
needs:
|
|
69
|
-
- release-build
|
|
70
43
|
- install-check
|
|
71
44
|
permissions:
|
|
72
45
|
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
+
# The weekly scan: a vulnerability published against a locked version needs no
|
|
2
|
+
# commit here to matter. Pull requests and pushes to main are scanned by the
|
|
3
|
+
# same step in ci.yml's Checks job -- every pull request bumps pyproject.toml,
|
|
4
|
+
# so a path filter here never skipped one, and a job of its own cost a billed
|
|
5
|
+
# minute for a few seconds of work.
|
|
6
|
+
|
|
1
7
|
name: Security Scan
|
|
2
8
|
|
|
3
9
|
on:
|
|
4
10
|
schedule:
|
|
5
11
|
# Run weekly on Mondays at 9:00 UTC
|
|
6
12
|
- cron: '0 9 * * 1'
|
|
7
|
-
push:
|
|
8
|
-
branches: [main]
|
|
9
|
-
paths:
|
|
10
|
-
- 'pyproject.toml'
|
|
11
|
-
- 'uv.lock'
|
|
12
|
-
pull_request:
|
|
13
|
-
branches: [main]
|
|
14
|
-
paths:
|
|
15
|
-
- 'pyproject.toml'
|
|
16
|
-
- 'uv.lock'
|
|
17
13
|
workflow_dispatch: # Allow manual triggers
|
|
18
14
|
|
|
19
15
|
permissions:
|
|
@@ -32,7 +32,7 @@ on:
|
|
|
32
32
|
ships with, so pinning the workflow's ref pins testudos too; empty
|
|
33
33
|
means the newest release.
|
|
34
34
|
type: string
|
|
35
|
-
default: "0.65.
|
|
35
|
+
default: "0.65.4" # testudos-release
|
|
36
36
|
testudos-from:
|
|
37
37
|
description: >-
|
|
38
38
|
Install testudos from here instead of PyPI: a path inside the
|
|
@@ -5,6 +5,41 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.65.4] - 2026-11-05
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- CI spends about 12 billed minutes on a pull request, from 17, and a merge
|
|
12
|
+
costs about 5 in all (CI, Release, publishing), from 8:
|
|
13
|
+
- the suite and its coverage gate are a step in the Checks job instead of a
|
|
14
|
+
`Test (Python 3.11)` job of their own;
|
|
15
|
+
- the reusable workflow is called once, fanned out. The default-mode call
|
|
16
|
+
went: the composite action's job runs the same single test job, and the
|
|
17
|
+
fan-out call covers the plan, coverage and result jobs;
|
|
18
|
+
- there is no `Status Check` job. Branch protection requires `Checks`,
|
|
19
|
+
`Self-Test (Dogfooding)`, `Reusable workflow (fan-out) / Result` and
|
|
20
|
+
`Composite action` directly;
|
|
21
|
+
- publishing has no build job: the install check builds the sdist and wheel,
|
|
22
|
+
installs and runs them, and keeps them for the upload, so what reaches
|
|
23
|
+
PyPI is exactly what was tested;
|
|
24
|
+
- Dependabot's GitHub Actions updates are monthly. Security updates still
|
|
25
|
+
arrive as soon as they are published.
|
|
26
|
+
|
|
27
|
+
## [0.65.3] - 2026-11-05
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- CI spends about 25 billed minutes on a pull request and its merge, from
|
|
31
|
+
about 43. Actions rounds every job up to a whole minute, and main re-ran all
|
|
32
|
+
of CI on the code its pull request had just tested:
|
|
33
|
+
- a push to main runs Checks and Test only. Dogfood, the reusable-workflow
|
|
34
|
+
runs and the composite action run on pull requests, and nothing waits on
|
|
35
|
+
main's run (`release.yml` publishes on its own);
|
|
36
|
+
- the OSV scan is a step in the Checks job, not a workflow of its own on
|
|
37
|
+
every pull request and push. `security.yml` keeps the weekly scan;
|
|
38
|
+
- the install check is one job, not two, running both resolutions in turn
|
|
39
|
+
through `scripts/install_check.sh`. It skips docs-only pull requests and
|
|
40
|
+
cancels a run a newer push supersedes. Its check is now named
|
|
41
|
+
`Install check`.
|
|
42
|
+
|
|
8
43
|
## [0.65.2] - 2026-11-04
|
|
9
44
|
|
|
10
45
|
### Changed
|
|
@@ -215,11 +215,18 @@ group (uv's default). Anything else the suite needs comes from `test-groups` /
|
|
|
215
215
|
The reusable workflow ships with its release: bump the `# testudos-release`
|
|
216
216
|
line in `.github/workflows/testudos.yml` and `action.yml` too
|
|
217
217
|
(`tests/test_release_pins.py` fails otherwise)
|
|
218
|
-
- **Test Matrix:** the suite runs on 3.11 with an 80% coverage gate
|
|
219
|
-
covers every version endoflife.date supports that
|
|
220
|
-
|
|
221
|
-
- **Dogfood:** Every
|
|
222
|
-
|
|
218
|
+
- **Test Matrix:** the suite runs on 3.11 with an 80% coverage gate, as a step
|
|
219
|
+
of the Checks job; dogfood covers every version endoflife.date supports that
|
|
220
|
+
`requires-python` admits
|
|
221
|
+
- **Dogfood:** Every pull request runs testudos on itself, and calls the
|
|
222
|
+
reusable workflow (fanned out) and the action. A push to main runs only
|
|
223
|
+
Checks: the pull request already ran the rest on the same code
|
|
224
|
+
- **CI spend:** Actions bills each job rounded up to a whole minute, so a few
|
|
225
|
+
seconds of work goes in an existing job as a step, not a job of its own (the
|
|
226
|
+
suite and the OSV scan are steps in Checks; the install check is one job).
|
|
227
|
+
Branch protection requires the jobs themselves; there is no aggregating job
|
|
228
|
+
- **Publishing:** Automated PyPI release on version tags, gated on the install
|
|
229
|
+
check, which builds the distributions that are published
|
|
223
230
|
- **Install check:** `install-check.yml` installs the built wheel with its
|
|
224
231
|
dependency ranges resolved at their highest and lowest -- not from
|
|
225
232
|
`uv.lock` -- and runs it against `.github/smoke-project`; weekly too.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: testudos
|
|
3
|
-
Version: 0.65.
|
|
3
|
+
Version: 0.65.4
|
|
4
4
|
Summary: A testing harness for Python packages using uv's isolated environments
|
|
5
5
|
Project-URL: Homepage, https://github.com/martinristovski/testudos
|
|
6
6
|
Project-URL: Documentation, https://github.com/martinristovski/testudos/blob/main/README.md
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# steps before the run (system packages, a cloud login for a private index),
|
|
6
6
|
# or runner groups.
|
|
7
7
|
#
|
|
8
|
-
# - uses: martinristovski/testudos@<release-sha> # v0.65.
|
|
8
|
+
# - uses: martinristovski/testudos@<release-sha> # v0.65.4
|
|
9
9
|
# with:
|
|
10
10
|
# args: --parallel --no-fail-fast
|
|
11
11
|
#
|
|
@@ -26,7 +26,7 @@ inputs:
|
|
|
26
26
|
description: >-
|
|
27
27
|
testudos version to run. The default is the release this action ships
|
|
28
28
|
with; empty means the newest release.
|
|
29
|
-
default: "0.65.
|
|
29
|
+
default: "0.65.4" # testudos-release
|
|
30
30
|
testudos-from:
|
|
31
31
|
description: >-
|
|
32
32
|
Install testudos from here instead of PyPI: a path inside the checkout,
|
|
@@ -772,6 +772,8 @@ shipping.
|
|
|
772
772
|
| 2026-11 | SIGTERM and SIGHUP stop a run like Ctrl-C | Test processes lead their own sessions, so a signal to testudos never reaches them; Python's default SIGTERM action orphaned every running suite. Translating to SIGINT reuses the cleanup Ctrl-C already has on every path. |
|
|
773
773
|
| 2026-11 | Linux and macOS only | Process-group termination is POSIX. On Windows a timeout stops `uv` but not the interpreter it forks, so the platform is declared unsupported and a run there warns, rather than shipping a partial tree-kill. |
|
|
774
774
|
| 2026-11 | click is reached through typer, never imported | typer 0.26 vendored click and dropped the dependency, so `import click` crashed every fresh install of 0.42.0–0.44.1 (#243). |
|
|
775
|
+
| 2026-11 | Fewer, fuller CI jobs | Each job is billed rounded up to a minute. The suite is a step in Checks (2 billed minutes, not 1 + 2); the default-mode reusable-workflow call goes, since the composite action runs the same single test job and the fan-out call covers plan, coverage and result; branch protection requires the jobs, not a Status Check job; the install check builds the release distributions, so publishing has no build job and uploads what was tested; Dependabot's Actions updates are monthly. About 12 billed minutes of CI a pull request, from 17, and 5 a merge, from 8. |
|
|
776
|
+
| 2026-11 | CI repeats nothing a merge already ran, and pays setup once per job | A pull request and its merge cost about 43 billed minutes for about 12 of work: each job is rounded up to a minute, and main re-ran all of CI on the code its pull request had just tested, though nothing waits on main's run. A push to main now runs Checks and Test only; the OSV scan is a step in Checks (every pull request bumps `pyproject.toml`, so its path filter never skipped one); the install check is one job running both resolutions, with a path filter and cancellation of superseded runs. About 25 minutes a pull request. |
|
|
775
777
|
| 2026-11 | testudos' dependencies are pinned by the release's upload time | A committed `constraints.txt`, its sha256 in the workflow and action, a release asset and a regeneration step on every `uv.lock` change kept the install on uv.lock's pins -- but the asset 404s while the repository is private, and the upkeep fell on every change. `--exclude-newer` a minute after the release's last upload to PyPI (read from PyPI's JSON API) gives what `install-check.yml`'s `highest` leg tested at the time, needs nothing per release, and a later typer still cannot break it (#243). Callers then get the newest dependencies of release day rather than uv.lock's, so Dependabot updates `uv.lock` weekly to keep the full suite on that set. Supersedes the two constraints rows below. |
|
|
776
778
|
| 2026-11 | The wheel is installed fresh before every release | Everything else in CI installs from `uv.lock` and could not see that. `install-check.yml` resolves the declared ranges at their highest and lowest, runs the result end to end, gates `python-publish.yml` and runs weekly, since upstream drift needs no commit here (#244). |
|
|
777
779
|
| 2026-11 | A crash exits 3 | Python's own exit code for an uncaught exception is 1, which CI reads as failing tests (#249). |
|
|
@@ -847,17 +849,18 @@ which is what the real one does).
|
|
|
847
849
|
|
|
848
850
|
`ci.yml` also calls the reusable workflow, `testudos.yml`, the way another
|
|
849
851
|
repository would, with `testudos-from: "."` so it runs this commit's testudos
|
|
850
|
-
against `.github/smoke-project
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
852
|
+
against `.github/smoke-project`. The call fans out: 3.12 and 3.13 in separate
|
|
853
|
+
jobs with `coverage-fail-under: "100"`, and since the smoke project covers one
|
|
854
|
+
branch on each side of 3.13, only the coverage job's combined report reaches
|
|
855
|
+
100%. The default path's single test job -- both versions in one run, coverage
|
|
856
|
+
checked in the job -- is what the composite action's job runs.
|
|
857
|
+
|
|
858
|
+
`install-check.yml` covers what the lockfile hides: it builds the sdist and
|
|
859
|
+
the wheel from it, installs the wheel with the declared dependency ranges resolved at their highest and
|
|
857
860
|
at their lowest (the declared requirements passed as direct ones, so
|
|
858
861
|
`lowest-direct` lowers them and not just testudos), and runs it end to end
|
|
859
862
|
against `.github/smoke-project`. It runs on pull requests, weekly, and before
|
|
860
|
-
every publish.
|
|
863
|
+
every publish, where the distributions it built and ran are the ones uploaded.
|
|
861
864
|
|
|
862
865
|
CI runs lint, strict mypy, the suite on 3.11 (the floor `requires-python`
|
|
863
866
|
admits) with an 80% coverage gate, and a dogfood run of testudos against
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Install the built wheel the way a user would, then run it end to end.
|
|
3
|
+
#
|
|
4
|
+
# scripts/install_check.sh <resolution> <python>
|
|
5
|
+
#
|
|
6
|
+
# Called by .github/workflows/install-check.yml once per resolution, after
|
|
7
|
+
# `uv build --wheel --out-dir dist`. testudos' declared requirements are passed
|
|
8
|
+
# as direct ones: with only the wheel direct, `lowest-direct` lowers testudos
|
|
9
|
+
# and nothing else.
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
resolution=$1
|
|
13
|
+
python=$2
|
|
14
|
+
root=$(pwd)
|
|
15
|
+
wheel=$(ls "$root"/dist/testudos-*.whl)
|
|
16
|
+
|
|
17
|
+
mapfile -t requirements < <(python3 -c '
|
|
18
|
+
import tomllib
|
|
19
|
+
project = tomllib.load(open("pyproject.toml", "rb"))["project"]
|
|
20
|
+
for r in project["dependencies"] + project["optional-dependencies"]["coverage"]:
|
|
21
|
+
print("--with=" + r)
|
|
22
|
+
')
|
|
23
|
+
# The other resolution's install, if it ran first.
|
|
24
|
+
uv tool uninstall testudos > /dev/null 2>&1 || true
|
|
25
|
+
uv tool install --python "$python" --resolution "$resolution" \
|
|
26
|
+
"${requirements[@]}" "testudos[coverage] @ file://$wheel"
|
|
27
|
+
# What was resolved, for the log: the point of this check.
|
|
28
|
+
uv pip list --python "$(uv tool dir)/testudos/bin/python"
|
|
29
|
+
|
|
30
|
+
cd "$root/.github/smoke-project"
|
|
31
|
+
rm -rf .testudos results.json
|
|
32
|
+
testudos --help > /dev/null
|
|
33
|
+
testudos versions --format json --offline
|
|
34
|
+
testudos run --python 3.12 --dry-run
|
|
35
|
+
# Two versions: the suite covers one branch on each side of 3.13, so only the
|
|
36
|
+
# combined report reaches 100%.
|
|
37
|
+
testudos run --python 3.12 --python 3.13 --coverage --coverage-fail-under 100 \
|
|
38
|
+
--junit-xml .testudos/junit --format json --output results.json
|
|
39
|
+
python3 -c "import json; d = json.load(open('results.json')); assert d['success'], d"
|
|
40
|
+
test -f .testudos/junit/3.12.xml
|
|
41
|
+
test -f .testudos/junit/3.13.xml
|