Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,3 @@ check:
@if command -v actionlint >/dev/null 2>&1; then actionlint; fi
{{ source_directory() }}/scripts/alert.sh check-coverage
@if command -v rustc >/dev/null 2>&1; then {{ source_directory() }}/scripts/package-binary.test.sh; fi
just gh gates-test
@if command -v cargo >/dev/null 2>&1; then just gh select-test; fi

# Which end-to-end lanes a diff needs, as `<lane>=true|false` lines. Takes the
# newline-separated changed-file list `just _changed` prints, and defaults to
# this branch's own diff so the answer is reproducible outside CI:
#
# just gh select
# just gh select "$(just _changed '')"
#
# gates.yml appends the output to $GITHUB_OUTPUT and drives one job per lane.
select $FILES="":
#!/usr/bin/env bash
set -euo pipefail
if [[ -z "$FILES" ]]; then
FILES=$(just _changed "")
fi
printf '%s' "$FILES" | {{ source_directory() }}/scripts/select.sh

# Check the impact map against the diff shapes it exists to catch.
[private]
select-test:
{{ source_directory() }}/scripts/select.test.sh

# Check that the aggregate verdict tells an irrelevant lane from a missing one.
[private]
gates-test:
{{ source_directory() }}/scripts/gates.test.sh
11 changes: 4 additions & 7 deletions .github/scripts/alert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,9 @@ non_pr_workflow_names() {

printf "%s\n" "${files[@]}" | bun -e '
const files = (await Bun.stdin.text()).split("\n").filter(Boolean);
// Triggers that report somewhere else, so a workflow with only these needs no
// entry. The pull request events report as a check on the PR itself, which is
// what alert.yml skips at runtime. workflow_call reports as part of the caller:
// a reusable workflow raises no workflow_run event of its own, so an entry for
// one would sit in alert.yml never firing.
const DELEGATED_EVENTS = new Set(["pull_request", "pull_request_target", "workflow_call"]);
// Both report their failure as a check on the PR itself, so alert.yml skips
// them at runtime and a workflow triggered only by these needs no entry.
const PR_EVENTS = new Set(["pull_request", "pull_request_target"]);
const names = [];
for (const file of files) {
const doc = Bun.YAML.parse(await Bun.file(file).text());
Expand All @@ -134,7 +131,7 @@ for (const file of files) {
console.error("alert.sh: cannot read the on: value of " + file);
process.exit(2);
}
if (!triggers.some((t) => !DELEGATED_EVENTS.has(t))) continue;
if (!triggers.some((t) => !PR_EVENTS.has(t))) continue;

const name = doc.name;
if (typeof name !== "string" || name.trim() === "") {
Expand Down
84 changes: 0 additions & 84 deletions .github/scripts/gates.sh

This file was deleted.

77 changes: 0 additions & 77 deletions .github/scripts/gates.test.sh

This file was deleted.

Loading
Loading