Initial commit

This commit is contained in:
2026-06-10 21:12:07 +00:00
commit 1a506d1892
11 changed files with 352 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
CONTRIBUTING="$ROOT_DIR/CONTRIBUTING.md"
assert_contains() {
local file="$1"
local needle="$2"
if ! grep -Fq -- "$needle" "$file"; then
printf 'Expected %s to contain: %s\n' "$file" "$needle" >&2
exit 1
fi
}
assert_contains "$CONTRIBUTING" "# Contributing"
assert_contains "$CONTRIBUTING" "## Before You Start"
assert_contains "$CONTRIBUTING" "issue number"
assert_contains "$CONTRIBUTING" "issue-123-update-readme"
assert_contains "$CONTRIBUTING" "Closes #123"
assert_contains "$CONTRIBUTING" "bash tests/run_test.sh"
assert_contains "$CONTRIBUTING" "tests/checks/"
assert_contains "$CONTRIBUTING" ".gitea/workflows/tests.yaml"
assert_contains "$CONTRIBUTING" "## Review Checklist"
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
ISSUE_TEMPLATE="$ROOT_DIR/.github/ISSUE_TEMPLATE.md"
PR_TEMPLATE="$ROOT_DIR/.github/PULL_REQUEST_TEMPLATE.md"
assert_contains() {
local file="$1"
local needle="$2"
if ! grep -Fq -- "$needle" "$file"; then
printf 'Expected %s to contain: %s\n' "$file" "$needle" >&2
exit 1
fi
}
assert_contains "$ISSUE_TEMPLATE" "## Improvement Area"
assert_contains "$ISSUE_TEMPLATE" "## Issue Type"
assert_contains "$ISSUE_TEMPLATE" "## Summary"
assert_contains "$ISSUE_TEMPLATE" "## Current Behavior"
assert_contains "$ISSUE_TEMPLATE" "## Expected Behavior"
assert_contains "$ISSUE_TEMPLATE" "## Steps To Reproduce"
assert_contains "$ISSUE_TEMPLATE" "## Testing Notes"
assert_contains "$ISSUE_TEMPLATE" "## Screenshots, Logs, or Extra Context"
assert_contains "$PR_TEMPLATE" "## Improvement Area"
assert_contains "$PR_TEMPLATE" "## Issue"
assert_contains "$PR_TEMPLATE" "Closes #"
assert_contains "$PR_TEMPLATE" "bash tests/run_test.sh"
assert_contains "$PR_TEMPLATE" "## Testing"
assert_contains "$PR_TEMPLATE" "## Deployment / Rollout Notes"
assert_contains "$PR_TEMPLATE" "Any follow-up work is tracked in TODO.md or an issue."
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
README="$ROOT_DIR/README.md"
assert_contains() {
local file="$1"
local needle="$2"
if ! grep -Fq -- "$needle" "$file"; then
printf 'Expected %s to contain: %s\n' "$file" "$needle" >&2
exit 1
fi
}
assert_contains "$README" "# "
assert_contains "$README" "## Overview"
assert_contains "$README" "## What's Included"
assert_contains "$README" "## Getting Started"
assert_contains "$README" "## Testing"
assert_contains "$README" "bash tests/run_test.sh"
assert_contains "$README" "## Contributing"
assert_contains "$README" "## Repository Layout"
assert_contains "$README" "See [ARCHITECTURE.md](ARCHITECTURE.md) to see the repo layout."
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
WORKFLOW="$ROOT_DIR/.gitea/workflows/tests.yaml"
assert_contains() {
local file="$1"
local needle="$2"
if ! grep -Fq -- "$needle" "$file"; then
printf 'Expected %s to contain: %s\n' "$file" "$needle" >&2
exit 1
fi
}
if [[ ! -f "$WORKFLOW" ]]; then
printf 'Expected workflow file to exist: %s\n' "$WORKFLOW" >&2
exit 1
fi
assert_contains "$WORKFLOW" "name: Template tests"
assert_contains "$WORKFLOW" "push"
assert_contains "$WORKFLOW" "pull_request"
assert_contains "$WORKFLOW" "opened"
assert_contains "$WORKFLOW" "synchronize"
assert_contains "$WORKFLOW" "reopened"
assert_contains "$WORKFLOW" "runs-on: ubuntu-latest"
assert_contains "$WORKFLOW" "uses: https://gitea.com/actions/checkout@v4"
assert_contains "$WORKFLOW" "bash tests/run_test.sh"