mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-28 23:29:06 +01:00
Compare commits
No commits in common. "9e23ebae4fa95336ca71051a6ec020e2dcbe9585" and "ac65def3effdf32ae3fe60ee18d0fbad59ac3836" have entirely different histories.
9e23ebae4f
...
ac65def3ef
@ -136,7 +136,7 @@ repos:
|
|||||||
# than merely an old one.
|
# than merely an old one.
|
||||||
- gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock
|
- gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock
|
||||||
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
|
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
|
||||||
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.12.0#subdirectory=earned_time
|
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.11.0#subdirectory=earned_time
|
||||||
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
|
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
|
||||||
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays
|
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays
|
||||||
- mcp>=2,<3
|
- mcp>=2,<3
|
||||||
@ -158,7 +158,7 @@ repos:
|
|||||||
# than merely an old one.
|
# than merely an old one.
|
||||||
- gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock
|
- gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock
|
||||||
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
|
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
|
||||||
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.12.0#subdirectory=earned_time
|
- earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.11.0#subdirectory=earned_time
|
||||||
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
|
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
|
||||||
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays
|
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays
|
||||||
- mcp>=2,<3
|
- mcp>=2,<3
|
||||||
@ -179,28 +179,9 @@ repos:
|
|||||||
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
# The CI mirror, one step per hook so each call stays under the 60 s
|
- id: ci-mirror
|
||||||
# action cap. Order matters: ci-venv (re)builds .ci-mirror-venv from
|
name: CI mirror (clean-venv pytest + pre-commit --all-files)
|
||||||
# requirements.txt when it changed, so ci-pytest only reuses it.
|
entry: bash scripts/ci_mirror.sh
|
||||||
- id: ci-venv
|
|
||||||
name: CI mirror (clean requirements.txt venv)
|
|
||||||
entry: bash scripts/ci_mirror.sh venv
|
|
||||||
language: system
|
|
||||||
pass_filenames: false
|
|
||||||
always_run: true
|
|
||||||
require_serial: true
|
|
||||||
stages: [manual]
|
|
||||||
- id: ci-precommit
|
|
||||||
name: CI mirror (pre-commit --all-files)
|
|
||||||
entry: bash scripts/ci_mirror.sh precommit
|
|
||||||
language: system
|
|
||||||
pass_filenames: false
|
|
||||||
always_run: true
|
|
||||||
require_serial: true
|
|
||||||
stages: [manual]
|
|
||||||
- id: ci-pytest
|
|
||||||
name: CI mirror (clean-venv pytest, xdist)
|
|
||||||
entry: bash scripts/ci_mirror.sh pytest
|
|
||||||
language: system
|
language: system
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
always_run: true
|
always_run: true
|
||||||
|
|||||||
@ -10,7 +10,7 @@ dependencies = [
|
|||||||
"gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock",
|
"gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock",
|
||||||
"crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync",
|
"crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync",
|
||||||
"freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays",
|
"freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays",
|
||||||
"earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.12.0#subdirectory=earned_time",
|
"earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.11.0#subdirectory=earned_time",
|
||||||
"sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays",
|
"sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.3.0#subdirectory=sickdays",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ bandit==1.9.4
|
|||||||
codespell==2.4.3
|
codespell==2.4.3
|
||||||
coverage==7.16.2
|
coverage==7.16.2
|
||||||
crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
|
crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync
|
||||||
earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.12.0#subdirectory=earned_time
|
earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.11.0#subdirectory=earned_time
|
||||||
freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
|
freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.0#subdirectory=freedays
|
||||||
gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock
|
gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock
|
||||||
mcp==2.3.0
|
mcp==2.3.0
|
||||||
|
|||||||
@ -18,12 +18,6 @@
|
|||||||
# Runs on demand (`scripts/check_gate_stamp.sh full`, pre-commit's manual
|
# Runs on demand (`scripts/check_gate_stamp.sh full`, pre-commit's manual
|
||||||
# stage) and in CI. It left the pre-push path on 2026-09-20: 10+ minutes
|
# stage) and in CI. It left the pre-push path on 2026-09-20: 10+ minutes
|
||||||
# per push under the resource cap, for work finish_auto.sh had just done.
|
# per push under the resource cap, for work finish_auto.sh had just done.
|
||||||
#
|
|
||||||
# Usage: ci_mirror.sh [venv|precommit|pytest|all] [pytest args...]
|
|
||||||
# Each step is its own manual hook (ci-venv, ci-precommit, ci-pytest) so no
|
|
||||||
# single call outlives the 60 s action cap; `all` (the default) is the old
|
|
||||||
# one-shot behaviour. pytest runs under xdist (-n auto --dist worksteal):
|
|
||||||
# serial it was ~85 s, and pytest-cov merges the workers' coverage.
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@ -86,32 +80,15 @@ run_precommit_all_files() {
|
|||||||
|
|
||||||
run_pytest_clean_venv() {
|
run_pytest_clean_venv() {
|
||||||
log "pytest in the clean venv (mirrors the Tests workflow)"
|
log "pytest in the clean venv (mirrors the Tests workflow)"
|
||||||
"$VENV_DIR/bin/python" -m pytest -n auto --dist worksteal "$@" \
|
"$VENV_DIR/bin/python" -m pytest "$@" || fail "pytest (clean requirements.txt venv)"
|
||||||
|| fail "pytest (clean requirements.txt venv)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
local mode="all"
|
|
||||||
case "${1:-}" in
|
|
||||||
venv | precommit | pytest | all) mode="$1"; shift ;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
precommit) run_precommit_all_files; return ;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
require_file
|
require_file
|
||||||
ensure_venv
|
ensure_venv
|
||||||
case "$mode" in
|
run_precommit_all_files
|
||||||
venv) ;;
|
run_pytest_clean_venv "$@"
|
||||||
pytest) run_pytest_clean_venv "$@" ;;
|
log "all CI gates passed locally — safe to push"
|
||||||
*)
|
|
||||||
run_precommit_all_files
|
|
||||||
run_pytest_clean_venv "$@"
|
|
||||||
log "all CI gates passed locally — safe to push"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user