Add GitHub Actions workflow for PR integration tests against UAA#701
Open
duanemay wants to merge 4 commits into
Open
Add GitHub Actions workflow for PR integration tests against UAA#701duanemay wants to merge 4 commits into
duanemay wants to merge 4 commits into
Conversation
Ports the Concourse "uaa-singular-tests" job (concourse/pull-requests/pipeline.yml in uaa-ci) to a self-contained GitHub Actions workflow that runs on every pull request: build cloudfoundry/uaa (develop), boot it, create the singular-test-client OAuth client, then run npm test (build + unit + Nightwatch integration) against it. The Concourse version depends on the private uaa-ci repo for its shared task script and on the github-pr-resource for status reporting; neither is needed here — GitHub Actions reports pass/fail natively, so the task logic is inlined directly into the workflow. Chromedriver is installed at runtime to match the runner's Chrome major version, same pattern the existing Concourse task already uses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a self-contained GitHub Actions workflow to run the existing UAA + Singular end-to-end integration flow on every PR, replacing the need for the Concourse uaa-singular-tests job for PR validation.
Changes:
- Introduces a
pull_requestworkflow that checks out this repo andcloudfoundry/uaa(develop), builds UAA, boots it, and waits for readiness. - Creates the
singular-test-clientvia UAA’s admin API, then installs Node deps + a Chrome-major-matchedchromedriver. - Starts the local static server and runs
npm test(build + unit + Nightwatch integration).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+16
to
+19
| with: | ||
| repository: cloudfoundry/uaa | ||
| ref: develop | ||
| path: uaa |
push-triggered workflows only run in a fork's own Actions context, not upstream, so external contributors' PRs (the normal case for this open-source repo) currently get no build/unit-test check at all. Adding pull_request coverage means every PR gets that fast feedback, alongside the new integration workflow. Same-repo branches will now run the job twice per commit once a PR is open (push + pull_request) — an accepted, minor cost for a job this cheap. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Add explicit contents: read permissions and persist-credentials: false on both checkouts, since this runs on pull_request (including forks) and doesn't need write access. - Use npm ci for a deterministic install, and --no-save when installing the Chrome-matched chromedriver so it doesn't mutate package-lock.json during the run. - Glob for the built WAR instead of hardcoding its filename, as cheap insurance against UAA's build ever changing its version string (verified it's currently fixed at 0.0.0, so this wasn't an active bug, but the previous run confirmed the working-directory/path itself was already correct). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- unit-test.yml: scope push/pull_request to main (avoids redundant runs on every feature-branch commit before/after a PR opens), and bump actions/checkout from v1 to v4. - pull-request-integration.yml: same push/pull_request scoping, plus a daily schedule (07:30 UTC) so drift in cloudfoundry/uaa's develop branch is caught even without an open PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the Concourse
uaa-singular-testsjob (concourse/pull-requests/pipeline.ymlinuaa-ci) to a self-contained GitHub Actions workflow (.github/workflows/pull-request-integration.yml) that runs on every pull request:cloudfoundry/uaa(develop, public repo — no deploy key needed)bootWarand boots it, polling/uaafor readinesssingular-test-clientOAuth client via the admin API (same payload the Concourse task and localtest/startUAA.shuse)chromedriverversion matching the runner's Chrome major version at runtime (same pattern the existing Concourse task already uses — never commit a pinned/downgraded version)npm test(build + unit + Nightwatch integration)Differences from the Concourse version, and why:
uaa-cirepo for the shared task script — the logic is inlined directly, since a public-repopull_requestworkflow (including fork PRs) shouldn't depend on a private repo.putsteps — GitHub Actions reports the job's pass/fail as the PR check natively.privileged: truecontainer —nightwatch.jsonalready runs Chrome with--no-sandbox, and GitHub'subuntu-latestrunners ship Chrome preinstalled.pull_request(notpull_request_target): runs with the fork's code and no repo secrets, since none are needed for this job.Also adds
pull_requesttounit-test.yml's trigger (alongside the existingpush).push-triggered workflows only run in a fork's own Actions context, not upstream, so external contributors' PRs currently get no build/unit-test check at all. Same-repo branches will now run that job twice per commit once a PR is open (push+pull_request) — an accepted, minor cost for a job this cheap.Test plan
npm test) succeeds end-to-end🤖 Generated with Claude Code