Skip to content

feat(ci): PR test gate — auto build + /test-passed confirmation#17

Merged
prostopasta merged 1 commit into
mainfrom
feat/pr-test-gate
Jun 15, 2026
Merged

feat(ci): PR test gate — auto build + /test-passed confirmation#17
prostopasta merged 1 commit into
mainfrom
feat/pr-test-gate

Conversation

@prostopasta

Copy link
Copy Markdown
Owner

What this adds

Every PR to main now automatically:

  1. Builds a test .deb from the branch and uploads it as a pre-release (pr-N-test tag)
  2. Posts a PR comment with the exact wget ... && sudo dpkg -i ... && xfce-night-switch-setup install command
  3. Sets a pending test-gate status check — blocks merge until confirmed
  4. After installing, xfce-night-switch-setup detects the PR build (PR_NUMBER file) and prompts the user to confirm the test interactively; if gh CLI is available and authenticated, posts /test-passed automatically
  5. On /test-passed PR commentpr-test-gate.yml sets the check to success and reacts 👍

How to enable the merge gate

Go to: Settings → Branches → Branch protection rules → Edit (main)

  • Enable: "Require status checks to pass before merging"
  • Add: test-gate

After that, PRs cannot be merged until someone installs the test build and confirms.

Files

File Purpose
.github/workflows/pr-build.yml Build test .deb on PR push
.github/workflows/pr-test-gate.yml Handle /test-passed, set check
packaging/bin/xfce-night-switch-setup Interactive confirmation prompt

- pr-build.yml: on every PR push builds a test .deb, creates a pre-release
  (pr-N-test tag), posts an install command in the PR comment, and sets
  a pending "test-gate" status check

- pr-test-gate.yml: on /test-passed comment sets the "test-gate" check
  to success and reacts with 👍

- xfce-night-switch-setup: detects PR_NUMBER file in installed package,
  prompts user to confirm, posts /test-passed via gh CLI (or shows link)

To enable the merge gate, set branch protection on main:
  Settings → Branches → Require status checks → "test-gate"
@github-actions

Copy link
Copy Markdown

🧪 Test build ready — PR #17

Install the test build (Ubuntu/Debian/Mint):

wget -q 'https://github.com/prostopasta/xfce-night-switch/releases/download/pr-17-test/xfce-night-switch_1.2.3-pr.17_all.deb' -O /tmp/xns-test.deb \
  && sudo dpkg -i /tmp/xns-test.deb \
  && xfce-night-switch-setup

After testing, confirm it works by commenting:

/test-passed

@prostopasta
prostopasta merged commit 6408c34 into main Jun 15, 2026
1 of 2 checks passed
prostopasta added a commit that referenced this pull request Jun 28, 2026
- pr-build.yml: on every PR push builds a test .deb, creates a pre-release
  (pr-N-test tag), posts an install command in the PR comment, and sets
  a pending "test-gate" status check

- pr-test-gate.yml: on /test-passed comment sets the "test-gate" check
  to success and reacts with 👍

- xfce-night-switch-setup: detects PR_NUMBER file in installed package,
  prompts user to confirm, posts /test-passed via gh CLI (or shows link)

To enable the merge gate, set branch protection on main:
  Settings → Branches → Require status checks → "test-gate"
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