gateseal 0.1.0__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.
- gateseal-0.1.0/.github/ISSUE_TEMPLATE/bug.yml +42 -0
- gateseal-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- gateseal-0.1.0/.github/ISSUE_TEMPLATE/feature.yml +26 -0
- gateseal-0.1.0/.github/actions/install-mise/action.yml +25 -0
- gateseal-0.1.0/.github/dependabot.yml +20 -0
- gateseal-0.1.0/.github/pull_request_template.md +13 -0
- gateseal-0.1.0/.github/workflows/integration.yml +101 -0
- gateseal-0.1.0/.github/workflows/mutation.yml +75 -0
- gateseal-0.1.0/.github/workflows/release.yml +228 -0
- gateseal-0.1.0/.github/workflows/tests.yml +112 -0
- gateseal-0.1.0/.gitignore +10 -0
- gateseal-0.1.0/.readthedocs.yaml +18 -0
- gateseal-0.1.0/CHANGELOG.md +36 -0
- gateseal-0.1.0/CONTRIBUTING.md +126 -0
- gateseal-0.1.0/GLOSSARY.md +110 -0
- gateseal-0.1.0/LICENSE +21 -0
- gateseal-0.1.0/PKG-INFO +214 -0
- gateseal-0.1.0/README.md +192 -0
- gateseal-0.1.0/SECURITY.md +30 -0
- gateseal-0.1.0/VISION.md +101 -0
- gateseal-0.1.0/ci/crap.py +307 -0
- gateseal-0.1.0/ci/demo.sh +76 -0
- gateseal-0.1.0/ci/release.py +329 -0
- gateseal-0.1.0/ci/select_tlc.py +64 -0
- gateseal-0.1.0/docs/add-a-tool.md +283 -0
- gateseal-0.1.0/docs/adopt-a-team-policy.md +100 -0
- gateseal-0.1.0/docs/architecture.md +171 -0
- gateseal-0.1.0/docs/assets/extra.css +67 -0
- gateseal-0.1.0/docs/assets/header-dark.svg +39 -0
- gateseal-0.1.0/docs/assets/header-light.svg +39 -0
- gateseal-0.1.0/docs/assets/mark.svg +34 -0
- gateseal-0.1.0/docs/authenticate.md +64 -0
- gateseal-0.1.0/docs/author-a-policy.md +189 -0
- gateseal-0.1.0/docs/commands-and-results.md +120 -0
- gateseal-0.1.0/docs/compiler-runtime.md +21 -0
- gateseal-0.1.0/docs/configure-a-repository.md +96 -0
- gateseal-0.1.0/docs/demo.md +117 -0
- gateseal-0.1.0/docs/design/0001-delegate-native-checks-provisioning-to-mise.md +7 -0
- gateseal-0.1.0/docs/design/0002-resolve-one-declarative-policy.md +9 -0
- gateseal-0.1.0/docs/design/0003-prepare-gateseal-tools-before-commits.md +9 -0
- gateseal-0.1.0/docs/design/0004-acquire-git-policy-releases-by-exact-commit.md +11 -0
- gateseal-0.1.0/docs/design/0005-version-policy-components-as-reviewed-catalogs.md +11 -0
- gateseal-0.1.0/docs/design/0006-generate-policy-lock-data-and-ship-the-runtime-with-the-compiler.md +9 -0
- gateseal-0.1.0/docs/design/0007-implement-tool-kinds-in-the-compiler-and-describe-every-tool-as-data.md +11 -0
- gateseal-0.1.0/docs/design/0008-generate-the-ci-gate-as-an-owned-workflow.md +24 -0
- gateseal-0.1.0/docs/design/0009-upgrade-through-one-planner-and-let-the-candidate-render-a-compiler-move.md +9 -0
- gateseal-0.1.0/docs/design/0010-share-one-sealed-interpreter-store-across-repositories.md +16 -0
- gateseal-0.1.0/docs/design/0011-share-sealed-hook-environments-through-the-interpreter-store.md +26 -0
- gateseal-0.1.0/docs/design/0012-fail-gateseal-pull-requests-on-surviving-mutants.md +20 -0
- gateseal-0.1.0/docs/design/README.md +21 -0
- gateseal-0.1.0/docs/github-ci.md +124 -0
- gateseal-0.1.0/docs/how-a-commit-runs.md +67 -0
- gateseal-0.1.0/docs/index.md +28 -0
- gateseal-0.1.0/docs/install.md +99 -0
- gateseal-0.1.0/docs/interpreter-store.md +89 -0
- gateseal-0.1.0/docs/local-preparation.md +151 -0
- gateseal-0.1.0/docs/policy-acquisition.md +99 -0
- gateseal-0.1.0/docs/policy-contract.md +197 -0
- gateseal-0.1.0/docs/policy-format.md +234 -0
- gateseal-0.1.0/docs/policy-lock.md +111 -0
- gateseal-0.1.0/docs/tested-platforms.md +43 -0
- gateseal-0.1.0/docs/tool-definitions.md +130 -0
- gateseal-0.1.0/docs/troubleshooting.md +156 -0
- gateseal-0.1.0/docs/upgrade.md +147 -0
- gateseal-0.1.0/docs/verification.md +184 -0
- gateseal-0.1.0/docs/what-the-tests-prove.md +79 -0
- gateseal-0.1.0/docs/what-the-tool-tests-prove.md +63 -0
- gateseal-0.1.0/docs/work-in-a-configured-repository.md +68 -0
- gateseal-0.1.0/formal/InterpreterStore.tla +93 -0
- gateseal-0.1.0/formal/MC.tla +7 -0
- gateseal-0.1.0/formal/PreparedAttempts.tla +611 -0
- gateseal-0.1.0/formal/check.py +194 -0
- gateseal-0.1.0/mkdocs.yml +114 -0
- gateseal-0.1.0/pyproject.toml +124 -0
- gateseal-0.1.0/runtime.toml +20 -0
- gateseal-0.1.0/scripts/lock_runtime.py +261 -0
- gateseal-0.1.0/scripts/mkdocs_hooks.py +168 -0
- gateseal-0.1.0/src/gateseal/__init__.py +1 -0
- gateseal-0.1.0/src/gateseal/__main__.py +3 -0
- gateseal-0.1.0/src/gateseal/authoring.py +403 -0
- gateseal-0.1.0/src/gateseal/bootstrap.py +778 -0
- gateseal-0.1.0/src/gateseal/candidate.py +221 -0
- gateseal-0.1.0/src/gateseal/checks.py +237 -0
- gateseal-0.1.0/src/gateseal/ci.py +182 -0
- gateseal-0.1.0/src/gateseal/cli.py +442 -0
- gateseal-0.1.0/src/gateseal/compiler_release.py +531 -0
- gateseal-0.1.0/src/gateseal/configured_hooks.py +107 -0
- gateseal-0.1.0/src/gateseal/data/reference/README.md +45 -0
- gateseal-0.1.0/src/gateseal/data/reference/policy.lock +54 -0
- gateseal-0.1.0/src/gateseal/data/reference/policy.toml +47 -0
- gateseal-0.1.0/src/gateseal/data/reference/rules/betterleaks.toml +33 -0
- gateseal-0.1.0/src/gateseal/data/reference/rules/ruff.toml +6 -0
- gateseal-0.1.0/src/gateseal/data/runtime.lock +171 -0
- gateseal-0.1.0/src/gateseal/data/tools/betterleaks.tool.toml +71 -0
- gateseal-0.1.0/src/gateseal/data/tools/pre-commit-hooks.tool.toml +25 -0
- gateseal-0.1.0/src/gateseal/data/tools/ruff.tool.toml +57 -0
- gateseal-0.1.0/src/gateseal/diagnostics.py +135 -0
- gateseal-0.1.0/src/gateseal/downloads.py +80 -0
- gateseal-0.1.0/src/gateseal/environments.py +115 -0
- gateseal-0.1.0/src/gateseal/github.py +172 -0
- gateseal-0.1.0/src/gateseal/hook_python.py +175 -0
- gateseal-0.1.0/src/gateseal/hook_results.py +85 -0
- gateseal-0.1.0/src/gateseal/hook_store.py +145 -0
- gateseal-0.1.0/src/gateseal/interpreter_store.py +388 -0
- gateseal-0.1.0/src/gateseal/lock.py +843 -0
- gateseal-0.1.0/src/gateseal/managed_files.py +152 -0
- gateseal-0.1.0/src/gateseal/manifest.py +592 -0
- gateseal-0.1.0/src/gateseal/manifest_toml.py +165 -0
- gateseal-0.1.0/src/gateseal/policy.py +633 -0
- gateseal-0.1.0/src/gateseal/policy_toml.py +275 -0
- gateseal-0.1.0/src/gateseal/policy_tools.py +337 -0
- gateseal-0.1.0/src/gateseal/processes.py +80 -0
- gateseal-0.1.0/src/gateseal/runtime.py +832 -0
- gateseal-0.1.0/src/gateseal/sources.py +386 -0
- gateseal-0.1.0/src/gateseal/tools/__init__.py +102 -0
- gateseal-0.1.0/src/gateseal/tools/choices.py +99 -0
- gateseal-0.1.0/src/gateseal/tools/model.py +759 -0
- gateseal-0.1.0/src/gateseal/tools/pre_commit_repository.py +324 -0
- gateseal-0.1.0/src/gateseal/tools/release_binary.py +580 -0
- gateseal-0.1.0/src/gateseal/upgrade.py +654 -0
- gateseal-0.1.0/src/gateseal/validation.py +96 -0
- gateseal-0.1.0/tests/artifact-source.json +4 -0
- gateseal-0.1.0/tests/black_policy.py +79 -0
- gateseal-0.1.0/tests/conftest.py +346 -0
- gateseal-0.1.0/tests/installation.py +221 -0
- gateseal-0.1.0/tests/prepared_attempts.py +139 -0
- gateseal-0.1.0/tests/run_private_tests.py +40 -0
- gateseal-0.1.0/tests/team_policy.py +42 -0
- gateseal-0.1.0/tests/test_acquisition.py +253 -0
- gateseal-0.1.0/tests/test_activation.py +320 -0
- gateseal-0.1.0/tests/test_activation_escaping_build.py +70 -0
- gateseal-0.1.0/tests/test_authoring_files.py +111 -0
- gateseal-0.1.0/tests/test_authoring_releases.py +76 -0
- gateseal-0.1.0/tests/test_authoring_versions.py +174 -0
- gateseal-0.1.0/tests/test_binary_only_policy.py +72 -0
- gateseal-0.1.0/tests/test_black_policy.py +198 -0
- gateseal-0.1.0/tests/test_bootstrap_main.py +141 -0
- gateseal-0.1.0/tests/test_bootstrap_platform.py +23 -0
- gateseal-0.1.0/tests/test_bootstrap_record.py +235 -0
- gateseal-0.1.0/tests/test_bootstrap_seals.py +201 -0
- gateseal-0.1.0/tests/test_bootstrap_staged.py +175 -0
- gateseal-0.1.0/tests/test_bootstrap_tree_payloads.py +14 -0
- gateseal-0.1.0/tests/test_candidate_commands.py +86 -0
- gateseal-0.1.0/tests/test_candidate_lock_disagreements.py +65 -0
- gateseal-0.1.0/tests/test_candidate_misbehaving.py +104 -0
- gateseal-0.1.0/tests/test_checks_outcomes.py +318 -0
- gateseal-0.1.0/tests/test_choices_releases.py +30 -0
- gateseal-0.1.0/tests/test_ci_checked_out.py +69 -0
- gateseal-0.1.0/tests/test_ci_gate.py +262 -0
- gateseal-0.1.0/tests/test_ci_scope.py +149 -0
- gateseal-0.1.0/tests/test_cli_commands.py +364 -0
- gateseal-0.1.0/tests/test_cli_gate.py +119 -0
- gateseal-0.1.0/tests/test_cli_parsing.py +228 -0
- gateseal-0.1.0/tests/test_cli_staged.py +209 -0
- gateseal-0.1.0/tests/test_cli_verbose.py +57 -0
- gateseal-0.1.0/tests/test_compiler_release_artifact.py +348 -0
- gateseal-0.1.0/tests/test_compiler_release_interpreters.py +50 -0
- gateseal-0.1.0/tests/test_compiler_release_runtime.py +162 -0
- gateseal-0.1.0/tests/test_compiler_runtime.py +332 -0
- gateseal-0.1.0/tests/test_compiler_selection.py +150 -0
- gateseal-0.1.0/tests/test_compiler_upgrade.py +294 -0
- gateseal-0.1.0/tests/test_configured_hooks.py +144 -0
- gateseal-0.1.0/tests/test_contracts.py +709 -0
- gateseal-0.1.0/tests/test_crap.py +437 -0
- gateseal-0.1.0/tests/test_diagnostics_rendering.py +57 -0
- gateseal-0.1.0/tests/test_download_failures.py +101 -0
- gateseal-0.1.0/tests/test_downloads_recovery.py +85 -0
- gateseal-0.1.0/tests/test_environments_uv.py +82 -0
- gateseal-0.1.0/tests/test_git_maintenance.py +25 -0
- gateseal-0.1.0/tests/test_git_version.py +145 -0
- gateseal-0.1.0/tests/test_github_workflow.py +237 -0
- gateseal-0.1.0/tests/test_gitleaks_policy.py +245 -0
- gateseal-0.1.0/tests/test_hook_python.py +408 -0
- gateseal-0.1.0/tests/test_hook_python_upstream.py +50 -0
- gateseal-0.1.0/tests/test_hook_store.py +102 -0
- gateseal-0.1.0/tests/test_hook_store_prepare.py +256 -0
- gateseal-0.1.0/tests/test_installed_hygiene.py +976 -0
- gateseal-0.1.0/tests/test_interpreter_store.py +398 -0
- gateseal-0.1.0/tests/test_interpreter_store_acquire.py +162 -0
- gateseal-0.1.0/tests/test_interpreter_store_collect.py +219 -0
- gateseal-0.1.0/tests/test_interpreter_store_normalize.py +47 -0
- gateseal-0.1.0/tests/test_interpreter_store_seal.py +231 -0
- gateseal-0.1.0/tests/test_lock_configure.py +369 -0
- gateseal-0.1.0/tests/test_lock_describe.py +44 -0
- gateseal-0.1.0/tests/test_lock_git_policy.py +290 -0
- gateseal-0.1.0/tests/test_lock_load.py +245 -0
- gateseal-0.1.0/tests/test_lock_ownership.py +153 -0
- gateseal-0.1.0/tests/test_lock_policy_request.py +143 -0
- gateseal-0.1.0/tests/test_lock_runtime.py +211 -0
- gateseal-0.1.0/tests/test_managed_files.py +14 -0
- gateseal-0.1.0/tests/test_managed_files_safety.py +187 -0
- gateseal-0.1.0/tests/test_manifest_edits.py +105 -0
- gateseal-0.1.0/tests/test_manifest_parsing.py +117 -0
- gateseal-0.1.0/tests/test_manifest_toml_layout.py +91 -0
- gateseal-0.1.0/tests/test_manifest_toml_order.py +50 -0
- gateseal-0.1.0/tests/test_model_definitions.py +146 -0
- gateseal-0.1.0/tests/test_model_stages.py +16 -0
- gateseal-0.1.0/tests/test_package_metadata.py +61 -0
- gateseal-0.1.0/tests/test_policy_authoring.py +731 -0
- gateseal-0.1.0/tests/test_policy_lock.py +96 -0
- gateseal-0.1.0/tests/test_policy_review.py +128 -0
- gateseal-0.1.0/tests/test_policy_review_source.py +13 -0
- gateseal-0.1.0/tests/test_policy_selection.py +382 -0
- gateseal-0.1.0/tests/test_policy_toml_layout.py +223 -0
- gateseal-0.1.0/tests/test_policy_toml_strings.py +20 -0
- gateseal-0.1.0/tests/test_policy_tools_names.py +20 -0
- gateseal-0.1.0/tests/test_pre_commit_repository_environments.py +326 -0
- gateseal-0.1.0/tests/test_processes_execution.py +63 -0
- gateseal-0.1.0/tests/test_python.py +480 -0
- gateseal-0.1.0/tests/test_release_binary_downloads.py +54 -0
- gateseal-0.1.0/tests/test_release_binary_policy.py +308 -0
- gateseal-0.1.0/tests/test_release_binary_preparation.py +357 -0
- gateseal-0.1.0/tests/test_release_script.py +254 -0
- gateseal-0.1.0/tests/test_runtime_cleanup.py +278 -0
- gateseal-0.1.0/tests/test_runtime_plan.py +144 -0
- gateseal-0.1.0/tests/test_runtime_prepared.py +433 -0
- gateseal-0.1.0/tests/test_runtime_worktree.py +143 -0
- gateseal-0.1.0/tests/test_secrets.py +626 -0
- gateseal-0.1.0/tests/test_sources_remote.py +154 -0
- gateseal-0.1.0/tests/test_sources_store.py +70 -0
- gateseal-0.1.0/tests/test_team_policy.py +594 -0
- gateseal-0.1.0/tests/test_team_tools.py +654 -0
- gateseal-0.1.0/tests/test_tool_definitions.py +325 -0
- gateseal-0.1.0/tests/test_tools_directory.py +36 -0
- gateseal-0.1.0/tests/test_unstaged_edits.py +226 -0
- gateseal-0.1.0/tests/test_upgrade.py +366 -0
- gateseal-0.1.0/tests/test_upgrade_candidate.py +115 -0
- gateseal-0.1.0/tests/test_upgrade_candidate_activation.py +97 -0
- gateseal-0.1.0/tests/test_upgrade_targets.py +442 -0
- gateseal-0.1.0/tests/test_upgrade_worktree.py +307 -0
- gateseal-0.1.0/tests/test_validation_fields.py +45 -0
- gateseal-0.1.0/tests/test_worktrees.py +251 -0
- gateseal-0.1.0/uv.lock +818 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: A gateseal command or a generated file does something wrong.
|
|
3
|
+
labels: [bug]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: what
|
|
7
|
+
attributes:
|
|
8
|
+
label: What happened
|
|
9
|
+
description: The command you ran, what it printed, and what you expected instead.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: steps
|
|
14
|
+
attributes:
|
|
15
|
+
label: Steps to reproduce
|
|
16
|
+
description: The shortest steps from a fresh clone, such as a scratch repository from the demo.
|
|
17
|
+
placeholder: |
|
|
18
|
+
1. gateseal configure --capability hygiene ...
|
|
19
|
+
2. gateseal activate
|
|
20
|
+
3. git commit ...
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: doctor
|
|
25
|
+
attributes:
|
|
26
|
+
label: Output of gateseal doctor --verbose
|
|
27
|
+
description: Remove any credentials or private URLs before you paste.
|
|
28
|
+
render: text
|
|
29
|
+
- type: input
|
|
30
|
+
id: version
|
|
31
|
+
attributes:
|
|
32
|
+
label: gateseal version
|
|
33
|
+
placeholder: gateseal --version
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: input
|
|
37
|
+
id: platform
|
|
38
|
+
attributes:
|
|
39
|
+
label: Platform
|
|
40
|
+
placeholder: macOS 26 arm64, Ubuntu 24.04 x86-64
|
|
41
|
+
validations:
|
|
42
|
+
required: true
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Report a security vulnerability
|
|
4
|
+
url: https://github.com/karstenevers/gateseal/security/advisories/new
|
|
5
|
+
about: Report it privately, as SECURITY.md describes.
|
|
6
|
+
- name: Read the documentation
|
|
7
|
+
url: https://gateseal.readthedocs.io/
|
|
8
|
+
about: The guide covers install, configuration, CI, team policies and upgrades.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Propose a capability, a tool or a change to how gateseal works.
|
|
3
|
+
labels: [enhancement]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Problem
|
|
9
|
+
description: What you are trying to do, and what stops you today.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: proposal
|
|
14
|
+
attributes:
|
|
15
|
+
label: Proposal
|
|
16
|
+
description: |
|
|
17
|
+
What gateseal should do instead. A new tool needs a tool kind that
|
|
18
|
+
gateseal implements, and gateseal leaves installing tools and running
|
|
19
|
+
hooks to mise, uv and pre-commit.
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: alternatives
|
|
24
|
+
attributes:
|
|
25
|
+
label: Alternatives
|
|
26
|
+
description: Other ways you considered, such as a team policy or a native tool setting.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Install the tested mise floor
|
|
2
|
+
description: Download mise 2026.10.19 for the runner, check its SHA-256 and put it on PATH.
|
|
3
|
+
runs:
|
|
4
|
+
using: composite
|
|
5
|
+
steps:
|
|
6
|
+
- shell: bash
|
|
7
|
+
run: |
|
|
8
|
+
case "$RUNNER_OS-$RUNNER_ARCH" in
|
|
9
|
+
Linux-X64)
|
|
10
|
+
asset=mise-v2026.10.19-linux-x64
|
|
11
|
+
sha256=3162760f40b6b5f706c60641e4ef5ee7322bc6c54f72fc26a7111b337aa18d9d ;;
|
|
12
|
+
macOS-ARM64)
|
|
13
|
+
asset=mise-v2026.10.19-macos-arm64
|
|
14
|
+
sha256=7dc61dfa71abbcda1c40d18440bc556b5d58b80e6042bc4f95fd106fa1bb3c66 ;;
|
|
15
|
+
*)
|
|
16
|
+
echo "::error::No tested mise build for $RUNNER_OS $RUNNER_ARCH"
|
|
17
|
+
exit 1 ;;
|
|
18
|
+
esac
|
|
19
|
+
bin="$RUNNER_TEMP/mise-bin"
|
|
20
|
+
mkdir -p "$bin"
|
|
21
|
+
curl --fail --silent --show-error --location --output "$bin/mise" \
|
|
22
|
+
"https://github.com/jdx/mise/releases/download/v2026.10.19/$asset"
|
|
23
|
+
echo "$sha256 $bin/mise" | shasum -a 256 --check
|
|
24
|
+
chmod +x "$bin/mise"
|
|
25
|
+
echo "$bin" >> "$GITHUB_PATH"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: github-actions
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
cooldown:
|
|
8
|
+
default-days: 7
|
|
9
|
+
groups:
|
|
10
|
+
actions:
|
|
11
|
+
patterns: ["*"]
|
|
12
|
+
- package-ecosystem: uv
|
|
13
|
+
directory: /
|
|
14
|
+
schedule:
|
|
15
|
+
interval: weekly
|
|
16
|
+
cooldown:
|
|
17
|
+
default-days: 7
|
|
18
|
+
groups:
|
|
19
|
+
python:
|
|
20
|
+
patterns: ["*"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## What and why
|
|
2
|
+
|
|
3
|
+
<!-- What this changes, and the issue it closes, such as "Closes #12". -->
|
|
4
|
+
|
|
5
|
+
## How you tested it
|
|
6
|
+
|
|
7
|
+
<!-- The commands you ran, such as the unit and integration layers, and the model check when it applies. -->
|
|
8
|
+
|
|
9
|
+
## Checklist
|
|
10
|
+
|
|
11
|
+
- [ ] Tests show the change.
|
|
12
|
+
- [ ] The documentation a user reads is updated.
|
|
13
|
+
- [ ] CHANGELOG.md has a line under Unreleased, if a user can notice the change.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
name: Integration tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
os:
|
|
10
|
+
description: Runner for the integration layer
|
|
11
|
+
type: choice
|
|
12
|
+
# macOS runs on pushes, pull requests and the schedule, never by hand, so a
|
|
13
|
+
# copy of this repository never starts one.
|
|
14
|
+
options: [ubuntu-latest, windows-latest]
|
|
15
|
+
default: ubuntu-latest
|
|
16
|
+
schedule:
|
|
17
|
+
- cron: "43 4 * * 1"
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
concurrency:
|
|
23
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
24
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
25
|
+
|
|
26
|
+
defaults:
|
|
27
|
+
run:
|
|
28
|
+
shell: bash
|
|
29
|
+
|
|
30
|
+
jobs:
|
|
31
|
+
integration:
|
|
32
|
+
name: integration (${{ matrix.os }})
|
|
33
|
+
# A copy of this repository runs its workflows only when started by hand.
|
|
34
|
+
if: github.repository == 'karstenevers/gateseal' || github.event_name == 'workflow_dispatch'
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
os: ${{ fromJSON(inputs.os && format('["{0}"]', inputs.os) || '["ubuntu-latest", "macos-latest"]') }}
|
|
39
|
+
runs-on: ${{ matrix.os }}
|
|
40
|
+
timeout-minutes: 35
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
43
|
+
with:
|
|
44
|
+
persist-credentials: false
|
|
45
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
46
|
+
with:
|
|
47
|
+
version: "0.13.6"
|
|
48
|
+
python-version: "3.14.10"
|
|
49
|
+
enable-cache: false
|
|
50
|
+
- name: Provision the development environment
|
|
51
|
+
run: uv sync --locked --python 3.14.10
|
|
52
|
+
- name: Install the tested mise floor
|
|
53
|
+
uses: ./.github/actions/install-mise
|
|
54
|
+
- name: Report prerequisite versions
|
|
55
|
+
run: |
|
|
56
|
+
git --version
|
|
57
|
+
uv --version
|
|
58
|
+
MISE_OFFLINE=1 mise --version
|
|
59
|
+
uv run python --version
|
|
60
|
+
- name: Test built wheels and real hooks
|
|
61
|
+
run: uv run pytest tests -n auto -m 'not network' -q
|
|
62
|
+
|
|
63
|
+
full-suite:
|
|
64
|
+
name: full-suite
|
|
65
|
+
# Pull requests from forks get no secrets, so only the base repository's
|
|
66
|
+
# branches read the private test fixtures.
|
|
67
|
+
if: >-
|
|
68
|
+
(github.repository == 'karstenevers/gateseal' || github.event_name == 'workflow_dispatch') &&
|
|
69
|
+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
timeout-minutes: 45
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
74
|
+
with:
|
|
75
|
+
persist-credentials: false
|
|
76
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
77
|
+
with:
|
|
78
|
+
version: "0.13.6"
|
|
79
|
+
python-version: "3.14.10"
|
|
80
|
+
enable-cache: false
|
|
81
|
+
- name: Provision the development environment
|
|
82
|
+
run: uv sync --locked --python 3.14.10
|
|
83
|
+
- name: Install the tested mise floor
|
|
84
|
+
uses: ./.github/actions/install-mise
|
|
85
|
+
- name: Test every layer under coverage
|
|
86
|
+
env:
|
|
87
|
+
# A fine-grained token that reads only karstenevers/gateseal-fixtures.
|
|
88
|
+
GH_TOKEN: ${{ secrets.FIXTURES_TOKEN }}
|
|
89
|
+
COVERAGE_FILE: ${{ runner.temp }}/coverage/.coverage
|
|
90
|
+
run: |
|
|
91
|
+
mkdir -p "$RUNNER_TEMP/coverage"
|
|
92
|
+
uv run coverage run tests/run_private_tests.py tests -n auto -q
|
|
93
|
+
- name: Score every function with its CRAP score
|
|
94
|
+
env:
|
|
95
|
+
COVERAGE_FILE: ${{ runner.temp }}/coverage/.coverage
|
|
96
|
+
run: |
|
|
97
|
+
report="$RUNNER_TEMP/coverage/coverage.json"
|
|
98
|
+
uv run coverage combine -q
|
|
99
|
+
uv run coverage report --format=total
|
|
100
|
+
uv run coverage json -q -o "$report"
|
|
101
|
+
uv run python ci/crap.py --coverage "$report" --limit 10
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Mutation tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "17 5 * * 1"
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
14
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
15
|
+
|
|
16
|
+
defaults:
|
|
17
|
+
run:
|
|
18
|
+
shell: bash
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
mutation-diff:
|
|
22
|
+
name: mutation-diff
|
|
23
|
+
# A copy of this repository runs its workflows only when started by hand.
|
|
24
|
+
if: github.event_name == 'pull_request' && github.repository == 'karstenevers/gateseal'
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
timeout-minutes: 25
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
persist-credentials: false
|
|
32
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
33
|
+
with:
|
|
34
|
+
version: "0.13.6"
|
|
35
|
+
python-version: "3.14.10"
|
|
36
|
+
enable-cache: false
|
|
37
|
+
- name: Provision the development environment
|
|
38
|
+
run: uv sync --locked --python 3.14.10
|
|
39
|
+
- name: Mutate the lines this pull request changes
|
|
40
|
+
env:
|
|
41
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
42
|
+
run: uv run pytestmut run --diff "$BASE_SHA" --no-cache --report text --report markdown
|
|
43
|
+
- name: Write the report to the job summary
|
|
44
|
+
if: ${{ !cancelled() }}
|
|
45
|
+
run: |
|
|
46
|
+
if [ -f .pytestmut/reports/report.md ]; then
|
|
47
|
+
cat .pytestmut/reports/report.md >> "$GITHUB_STEP_SUMMARY"
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
mutation-full:
|
|
51
|
+
name: mutation-full
|
|
52
|
+
if: >-
|
|
53
|
+
github.event_name == 'workflow_dispatch' ||
|
|
54
|
+
(github.event_name == 'schedule' && github.repository == 'karstenevers/gateseal')
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
timeout-minutes: 90
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
59
|
+
with:
|
|
60
|
+
persist-credentials: false
|
|
61
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
62
|
+
with:
|
|
63
|
+
version: "0.13.6"
|
|
64
|
+
python-version: "3.14.10"
|
|
65
|
+
enable-cache: false
|
|
66
|
+
- name: Provision the development environment
|
|
67
|
+
run: uv sync --locked --python 3.14.10
|
|
68
|
+
- name: Mutate the whole unit layer
|
|
69
|
+
run: uv run pytestmut run --no-cache --report text --report markdown
|
|
70
|
+
- name: Write the report to the job summary
|
|
71
|
+
if: ${{ !cancelled() }}
|
|
72
|
+
run: |
|
|
73
|
+
if [ -f .pytestmut/reports/report.md ]; then
|
|
74
|
+
cat .pytestmut/reports/report.md >> "$GITHUB_STEP_SUMMARY"
|
|
75
|
+
fi
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions: {}
|
|
9
|
+
|
|
10
|
+
defaults:
|
|
11
|
+
run:
|
|
12
|
+
shell: bash
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
version:
|
|
16
|
+
name: Find a new version
|
|
17
|
+
# A copy of this repository runs nothing, even when started by hand.
|
|
18
|
+
if: github.repository == 'karstenevers/gateseal'
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 5
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
outputs:
|
|
24
|
+
version: ${{ steps.check.outputs.version }}
|
|
25
|
+
release: ${{ steps.check.outputs.release }}
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
persist-credentials: false
|
|
31
|
+
- name: Compare the version with the previous commit
|
|
32
|
+
id: check
|
|
33
|
+
env:
|
|
34
|
+
EVENT_NAME: ${{ github.event_name }}
|
|
35
|
+
BEFORE_SHA: ${{ github.event.before }}
|
|
36
|
+
run: python3 ci/release.py check
|
|
37
|
+
|
|
38
|
+
tests:
|
|
39
|
+
name: Wait for the tests
|
|
40
|
+
needs: version
|
|
41
|
+
if: github.repository == 'karstenevers/gateseal' && needs.version.outputs.release == 'true'
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
timeout-minutes: 90
|
|
44
|
+
permissions:
|
|
45
|
+
actions: read
|
|
46
|
+
contents: read
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
49
|
+
with:
|
|
50
|
+
persist-credentials: false
|
|
51
|
+
- name: Wait for Tests and Integration tests on this commit
|
|
52
|
+
env:
|
|
53
|
+
GH_TOKEN: ${{ github.token }}
|
|
54
|
+
run: python3 ci/release.py wait
|
|
55
|
+
|
|
56
|
+
build:
|
|
57
|
+
name: Build twice
|
|
58
|
+
needs: [version, tests]
|
|
59
|
+
if: github.repository == 'karstenevers/gateseal'
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
timeout-minutes: 15
|
|
62
|
+
permissions:
|
|
63
|
+
contents: read
|
|
64
|
+
outputs:
|
|
65
|
+
wheel-sha256: ${{ steps.build.outputs.wheel-sha256 }}
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
68
|
+
with:
|
|
69
|
+
persist-credentials: false
|
|
70
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
71
|
+
with:
|
|
72
|
+
version: "0.13.6"
|
|
73
|
+
python-version: "3.14.10"
|
|
74
|
+
enable-cache: false
|
|
75
|
+
- name: Build the wheel and the sdist twice and compare them
|
|
76
|
+
id: build
|
|
77
|
+
env:
|
|
78
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
79
|
+
run: |
|
|
80
|
+
wheel="gateseal-$VERSION-py3-none-any.whl"
|
|
81
|
+
sdist="gateseal-$VERSION.tar.gz"
|
|
82
|
+
expected="$(printf '%s\n' "$sdist" "$wheel" | sort)"
|
|
83
|
+
for n in 1 2; do
|
|
84
|
+
out="$RUNNER_TEMP/build-$n"
|
|
85
|
+
env -u PYTHONPATH UV_CACHE_DIR="$RUNNER_TEMP/cache-$n" \
|
|
86
|
+
uv build --no-config --python 3.14.10 --out-dir "$out" .
|
|
87
|
+
# uv builds the sdist, then the wheel from it, and writes a
|
|
88
|
+
# .gitignore into the out dir.
|
|
89
|
+
actual="$(find "$out" -maxdepth 1 -type f ! -name '.*' -printf '%f\n' | sort)"
|
|
90
|
+
if [ "$actual" != "$expected" ]; then
|
|
91
|
+
echo "::error::Build $n made ${actual//$'\n'/ } instead of $sdist and $wheel"
|
|
92
|
+
exit 1
|
|
93
|
+
fi
|
|
94
|
+
done
|
|
95
|
+
echo "SHA-256 of both builds:" >> "$GITHUB_STEP_SUMMARY"
|
|
96
|
+
for file in "$wheel" "$sdist"; do
|
|
97
|
+
first="$(sha256sum "$RUNNER_TEMP/build-1/$file" | cut -d ' ' -f 1)"
|
|
98
|
+
second="$(sha256sum "$RUNNER_TEMP/build-2/$file" | cut -d ' ' -f 1)"
|
|
99
|
+
if [ "$first" != "$second" ]; then
|
|
100
|
+
echo "::error::The two builds of $file differ: $first and $second"
|
|
101
|
+
exit 1
|
|
102
|
+
fi
|
|
103
|
+
echo "- \`$file\`: \`$first\`" >> "$GITHUB_STEP_SUMMARY"
|
|
104
|
+
if [ "$file" = "$wheel" ]; then
|
|
105
|
+
echo "wheel-sha256=$first" >> "$GITHUB_OUTPUT"
|
|
106
|
+
fi
|
|
107
|
+
done
|
|
108
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
109
|
+
with:
|
|
110
|
+
name: dist
|
|
111
|
+
path: |
|
|
112
|
+
${{ runner.temp }}/build-1/gateseal-${{ needs.version.outputs.version }}-py3-none-any.whl
|
|
113
|
+
${{ runner.temp }}/build-1/gateseal-${{ needs.version.outputs.version }}.tar.gz
|
|
114
|
+
if-no-files-found: error
|
|
115
|
+
|
|
116
|
+
testpypi:
|
|
117
|
+
name: Publish to TestPyPI
|
|
118
|
+
needs: [version, build]
|
|
119
|
+
if: github.repository == 'karstenevers/gateseal'
|
|
120
|
+
runs-on: ubuntu-latest
|
|
121
|
+
timeout-minutes: 10
|
|
122
|
+
environment:
|
|
123
|
+
name: testpypi
|
|
124
|
+
url: https://test.pypi.org/project/gateseal/${{ needs.version.outputs.version }}/
|
|
125
|
+
permissions:
|
|
126
|
+
id-token: write
|
|
127
|
+
steps:
|
|
128
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
129
|
+
with:
|
|
130
|
+
name: dist
|
|
131
|
+
path: dist/
|
|
132
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086
|
|
133
|
+
with:
|
|
134
|
+
repository-url: https://test.pypi.org/legacy/
|
|
135
|
+
# A re-run finds its files there already. The demo job then proves
|
|
136
|
+
# that TestPyPI serves this build's wheel.
|
|
137
|
+
skip-existing: true
|
|
138
|
+
|
|
139
|
+
demo:
|
|
140
|
+
name: Run the demo from TestPyPI
|
|
141
|
+
needs: [version, build, testpypi]
|
|
142
|
+
if: github.repository == 'karstenevers/gateseal'
|
|
143
|
+
runs-on: ubuntu-latest
|
|
144
|
+
timeout-minutes: 30
|
|
145
|
+
permissions:
|
|
146
|
+
contents: read
|
|
147
|
+
steps:
|
|
148
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
149
|
+
with:
|
|
150
|
+
persist-credentials: false
|
|
151
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
152
|
+
with:
|
|
153
|
+
version: "0.13.6"
|
|
154
|
+
python-version: "3.14.10"
|
|
155
|
+
enable-cache: false
|
|
156
|
+
- name: Install the tested mise floor
|
|
157
|
+
uses: ./.github/actions/install-mise
|
|
158
|
+
- name: Download the wheel TestPyPI serves
|
|
159
|
+
env:
|
|
160
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
161
|
+
SHA256: ${{ needs.build.outputs.wheel-sha256 }}
|
|
162
|
+
run: python3 ci/release.py served --version "$VERSION" --sha256 "$SHA256" --dest "$RUNNER_TEMP/served"
|
|
163
|
+
- name: Install the served wheel in a fresh environment
|
|
164
|
+
env:
|
|
165
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
166
|
+
SHA256: ${{ needs.build.outputs.wheel-sha256 }}
|
|
167
|
+
run: |
|
|
168
|
+
wheel="$RUNNER_TEMP/served/gateseal-$VERSION-py3-none-any.whl"
|
|
169
|
+
environment="$RUNNER_TEMP/gateseal-env"
|
|
170
|
+
requirements="$RUNNER_TEMP/gateseal-requirements.txt"
|
|
171
|
+
uv venv --python 3.14.10 "$environment"
|
|
172
|
+
printf '%s --hash=sha256:%s\n' "$wheel" "$SHA256" > "$requirements"
|
|
173
|
+
uv pip install --python "$environment/bin/python" --require-hashes -r "$requirements"
|
|
174
|
+
echo "$environment/bin" >> "$GITHUB_PATH"
|
|
175
|
+
"$environment/bin/gateseal" --version
|
|
176
|
+
- name: Run the demo
|
|
177
|
+
env:
|
|
178
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
179
|
+
SHA256: ${{ needs.build.outputs.wheel-sha256 }}
|
|
180
|
+
run: ci/demo.sh "$RUNNER_TEMP/served/gateseal-$VERSION-py3-none-any.whl" "$SHA256"
|
|
181
|
+
|
|
182
|
+
pypi:
|
|
183
|
+
name: Publish to PyPI
|
|
184
|
+
needs: [version, demo]
|
|
185
|
+
if: github.repository == 'karstenevers/gateseal'
|
|
186
|
+
runs-on: ubuntu-latest
|
|
187
|
+
timeout-minutes: 10
|
|
188
|
+
environment:
|
|
189
|
+
name: pypi
|
|
190
|
+
url: https://pypi.org/project/gateseal/${{ needs.version.outputs.version }}/
|
|
191
|
+
permissions:
|
|
192
|
+
id-token: write
|
|
193
|
+
steps:
|
|
194
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
195
|
+
with:
|
|
196
|
+
name: dist
|
|
197
|
+
path: dist/
|
|
198
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086
|
|
199
|
+
|
|
200
|
+
github-release:
|
|
201
|
+
name: Release on GitHub
|
|
202
|
+
needs: [version, pypi]
|
|
203
|
+
if: github.repository == 'karstenevers/gateseal'
|
|
204
|
+
runs-on: ubuntu-latest
|
|
205
|
+
timeout-minutes: 10
|
|
206
|
+
permissions:
|
|
207
|
+
contents: write
|
|
208
|
+
steps:
|
|
209
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
210
|
+
with:
|
|
211
|
+
persist-credentials: false
|
|
212
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
213
|
+
with:
|
|
214
|
+
name: dist
|
|
215
|
+
path: dist/
|
|
216
|
+
- name: Create the release with both files and their SHA-256
|
|
217
|
+
env:
|
|
218
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
219
|
+
GH_TOKEN: ${{ github.token }}
|
|
220
|
+
GH_REPO: ${{ github.repository }}
|
|
221
|
+
run: |
|
|
222
|
+
(cd dist && sha256sum "gateseal-$VERSION-py3-none-any.whl" "gateseal-$VERSION.tar.gz") > SHA256SUMS
|
|
223
|
+
cat SHA256SUMS
|
|
224
|
+
python3 ci/release.py notes --version "$VERSION" > "$RUNNER_TEMP/notes.md"
|
|
225
|
+
# gh uploads the files to a draft and publishes it afterwards, as an
|
|
226
|
+
# immutable release needs, and deletes the draft if an upload fails.
|
|
227
|
+
gh release create "v$VERSION" dist/* SHA256SUMS --target "$GITHUB_SHA" \
|
|
228
|
+
--title "gateseal $VERSION" --notes-file "$RUNNER_TEMP/notes.md"
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
os:
|
|
10
|
+
description: Runner for the unit tests
|
|
11
|
+
type: choice
|
|
12
|
+
# The integration workflow covers macOS, so no one starts it by hand.
|
|
13
|
+
options: [ubuntu-latest, windows-latest]
|
|
14
|
+
default: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
21
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
22
|
+
|
|
23
|
+
defaults:
|
|
24
|
+
run:
|
|
25
|
+
shell: bash
|
|
26
|
+
|
|
27
|
+
jobs:
|
|
28
|
+
tests:
|
|
29
|
+
name: tests
|
|
30
|
+
# A copy of this repository runs its workflows only when started by hand.
|
|
31
|
+
if: github.repository == 'karstenevers/gateseal' || github.event_name == 'workflow_dispatch'
|
|
32
|
+
runs-on: ${{ inputs.os || 'ubuntu-latest' }}
|
|
33
|
+
timeout-minutes: 15
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
36
|
+
with:
|
|
37
|
+
persist-credentials: false
|
|
38
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
39
|
+
with:
|
|
40
|
+
version: "0.13.6"
|
|
41
|
+
python-version: "3.14.10"
|
|
42
|
+
enable-cache: false
|
|
43
|
+
- name: Provision the development environment
|
|
44
|
+
run: uv sync --locked --python 3.14.10
|
|
45
|
+
- name: Report prerequisite versions
|
|
46
|
+
run: |
|
|
47
|
+
git --version
|
|
48
|
+
uv --version
|
|
49
|
+
uv run python --version
|
|
50
|
+
- name: Check style and strict types
|
|
51
|
+
run: |
|
|
52
|
+
uv run ruff check .
|
|
53
|
+
uv run ruff format --check .
|
|
54
|
+
uv run pyright
|
|
55
|
+
- name: Test the unit layer
|
|
56
|
+
run: uv run pytest tests -m 'not integration and not network' -q
|
|
57
|
+
|
|
58
|
+
tlc:
|
|
59
|
+
name: tlc
|
|
60
|
+
if: github.repository == 'karstenevers/gateseal' || github.event_name == 'workflow_dispatch'
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
timeout-minutes: 15
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
65
|
+
with:
|
|
66
|
+
fetch-depth: 0
|
|
67
|
+
persist-credentials: false
|
|
68
|
+
- name: Select the model check
|
|
69
|
+
id: select
|
|
70
|
+
env:
|
|
71
|
+
EVENT_NAME: ${{ github.event_name }}
|
|
72
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
73
|
+
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
74
|
+
BEFORE_SHA: ${{ github.event.before }}
|
|
75
|
+
run: python3 ci/select_tlc.py
|
|
76
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
77
|
+
if: steps.select.outputs.required == 'true'
|
|
78
|
+
with:
|
|
79
|
+
version: "0.13.6"
|
|
80
|
+
python-version: "3.14.10"
|
|
81
|
+
enable-cache: false
|
|
82
|
+
- name: Provision the development environment
|
|
83
|
+
if: steps.select.outputs.required == 'true'
|
|
84
|
+
run: uv sync --locked --python 3.14.10
|
|
85
|
+
- name: Model-check prepared attempts with TLC
|
|
86
|
+
if: steps.select.outputs.required == 'true'
|
|
87
|
+
run: |
|
|
88
|
+
jar="$RUNNER_TEMP/tla2tools.jar"
|
|
89
|
+
curl --fail --silent --show-error --location --output "$jar" \
|
|
90
|
+
https://github.com/tlaplus/tlaplus/releases/download/v1.7.4/tla2tools.jar
|
|
91
|
+
echo "936a262061c914694dfd669a543be24573c45d5aa0ff20a8b96b23d01e050e88 $jar" | sha256sum --check
|
|
92
|
+
java -version
|
|
93
|
+
TLA2TOOLS="$jar" JAVA="$(command -v java)" uv run python formal/check.py
|
|
94
|
+
|
|
95
|
+
docs:
|
|
96
|
+
name: docs
|
|
97
|
+
if: github.repository == 'karstenevers/gateseal' || github.event_name == 'workflow_dispatch'
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
timeout-minutes: 10
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
102
|
+
with:
|
|
103
|
+
persist-credentials: false
|
|
104
|
+
- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9
|
|
105
|
+
with:
|
|
106
|
+
version: "0.13.6"
|
|
107
|
+
python-version: "3.14.10"
|
|
108
|
+
enable-cache: false
|
|
109
|
+
- name: Build the documentation site strictly
|
|
110
|
+
env:
|
|
111
|
+
NO_MKDOCS_2_WARNING: "1"
|
|
112
|
+
run: uv run --locked --only-group docs mkdocs build --strict
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-24.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.14"
|
|
7
|
+
jobs:
|
|
8
|
+
pre_create_environment:
|
|
9
|
+
- python -m pip install uv==0.13.6
|
|
10
|
+
- asdf reshim python
|
|
11
|
+
create_environment:
|
|
12
|
+
- uv venv --python 3.14.10 "${READTHEDOCS_VIRTUALENV_PATH}"
|
|
13
|
+
install:
|
|
14
|
+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --locked --only-group docs
|
|
15
|
+
|
|
16
|
+
mkdocs:
|
|
17
|
+
configuration: mkdocs.yml
|
|
18
|
+
fail_on_warning: true
|