Skip to content

test: add a shell test suite and CI, fix same-second release collision - #2

Merged
wonmors merged 2 commits into
mainfrom
test/shell-suite
Nov 14, 2026
Merged

wonmors merged 2 commits into
mainfrom
test/shell-suite

Conversation

@xnosir

@xnosir xnosir commented Nov 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Tests: tests/run.sh, 33 checks for remote.sh, rollback.sh and deploy.sh end to end. docker, ssh, curl and date are stubbed on PATH, so no server or Docker is needed.
  • CI: ShellCheck (--severity=style) on all scripts plus the tests on every pull request (build), and a DCO sign-off check (dco).
  • Bug fix: deploying the same commit twice within one second produced the same release name; mv new/site www/releases/$REL then moved the new site inside the live release directory. remote.sh now stops before anything changes. The test for it failed before the fix and passes after it.
  • Docs: CONTRIBUTING.md, SECURITY.md (private vulnerability reporting), CHANGELOG.md, and a Testing section in the README.

Test

Local run (Git Bash): passed: 33, failed: 0. CI runs the same on ubuntu-24.04.

- tests/run.sh: 33 checks for remote.sh, rollback.sh and deploy.sh end to end, with docker,
  ssh, curl and date stubbed on PATH, so no server is needed.
- CI: ShellCheck (style severity) and the tests on every pull request; DCO check.
- remote.sh: the same commit deployed twice within one second got the same release name and
  mv moved the new site inside the live release. It now stops before anything changes.
- CONTRIBUTING.md, SECURITY.md, CHANGELOG.md.

Signed-off-by: xnosir <283333996+xnosir@users.noreply.github.com>
@xnosir
xnosir requested a review from a team as a code owner November 14, 2026 16:26
Signed-off-by: xnosir <283333996+xnosir@users.noreply.github.com>
@wonmors
wonmors merged commit 9adeeed into main Nov 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant