-
Notifications
You must be signed in to change notification settings - Fork 0
Move PR testing to full service #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
John Gluck (JohnGluck)
wants to merge
2
commits into
main
Choose a base branch
from
pr-testing-deprecate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,48 @@ | ||
| --- | ||
| title: "How to enable PR testing for GitHub Integrations" | ||
| title: "Setting up PR testing" | ||
| description: "Run QA Wolf tests against preview environments on pull requests and report results as GitHub status checks." | ||
| sidebarTitle: "GitHub" | ||
| --- | ||
|
|
||
| ## What QA Wolf configures | ||
| <Info> | ||
| This guide is for QA Wolf full service customers. If you're unsure whether this applies to you, contact your QA Wolf team. | ||
| </Info> | ||
|
|
||
| PR testing runs QA Wolf tests against preview environments before changes are merged. Tests run when a pull request enters the merge queue, and results are reported back to GitHub as a required status check. | ||
| ## Configure basic PR testing | ||
|
|
||
| <Tip> | ||
| Your [GitHub integration](/qawolf/GitHub-GitHub-Actions-2a15b2a994fb800699f6dc99584915d0) and deploy notifications must already be set up. | ||
| </Tip> | ||
| <Steps> | ||
| <Step title="Configure GitHub integration"> | ||
| Configure the GitHub integration in your team's settings page. | ||
| </Step> | ||
| <Step title="Notify QA Wolf of preview deployments"> | ||
| Choose one of the following methods to tell QA Wolf when a new preview environment is ready to be tested. | ||
|
|
||
| **GitHub Deployments** | ||
|
|
||
| If your team uses a hosting platform that integrates with GitHub — like Vercel — your deployments are already being reported to GitHub via the [GitHub Deployments API](https://docs.github.com/en/rest/deployments/deployments). QA Wolf listens for those deployment records and automatically acts when one is marked as successful. No additional configuration is required. | ||
|
|
||
| **GitHub Action** | ||
|
|
||
| Configure the [Notify QA Wolf on Deploy](https://github.com/marketplace/actions/notify-qa-wolf-on-deploy) GitHub Action to tell us when a new preview environment is ready to be tested. | ||
|
|
||
| **SDK** | ||
|
|
||
| PR testing won't work until QA Wolf configures your workspace to support it. QA Wolf will: | ||
| If GitHub Actions aren't an option, the `@qawolf/ci-sdk` npm package offers a flexible alternative. See the [npm package documentation](https://www.npmjs.com/package/@qawolf/ci-sdk) for setup details. | ||
| </Step> | ||
| <Step title="Ask your QA Wolf team to set up triggers"> | ||
| QA Wolf will configure a trigger that matches your preview deployments. Reach out to your QA Wolf team to get this set up. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| - Set up a trigger that matches your preview deployments | ||
| - Provide the deployment-type value to use for preview tests | ||
| - Confirm the preview URL variable and the status check name (for example, **QA Wolf Test Results**) | ||
| --- | ||
|
|
||
| ## Before you begin | ||
| ## Advanced: Merge queue setup | ||
|
|
||
| <Check> | ||
| Each pull request must deploy a preview environment that QA Wolf can reach. Your CI should provide a stable preview URL per PR and a step that waits until the preview is live before tests start. | ||
| </Check> | ||
| <Info> | ||
| This section covers an optional flow for teams using GitHub's merge queue feature. Most teams don't need this. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of "Most teams don't need this.", you could explain why they might? Using a merge queue is common, but I guess we are saying that most customer choose not to run QA Wolf tests in it. Why do some? I don't actually know the answer, but I'm guessing Eric E might. |
||
| </Info> | ||
|
|
||
| ## Add a default passing PR check | ||
| ### Add a default passing PR check | ||
|
|
||
| Add a GitHub Actions workflow that creates a passing **QA Wolf Test Results** check when a PR is opened or updated. This prevents pull requests from being blocked before the merge queue run happens. | ||
|
|
||
|
|
@@ -60,7 +78,7 @@ jobs: | |
| }); | ||
| ``` | ||
|
|
||
| ## Trigger QA Wolf tests in the merge queue | ||
| ### Trigger QA Wolf tests in the merge queue | ||
|
|
||
| Add a GitHub Actions workflow that notifies QA Wolf only during merge queue execution. | ||
|
|
||
|
|
@@ -90,37 +108,17 @@ jobs: | |
|
|
||
| - Your CI pipeline already creates a preview environment per pull request. | ||
| - The preview environment URL is available as `PREVIEW_URL` when this job runs. | ||
| - A prior job (such as wait-for-preview-environment) ensures the preview environment is fully deployed and reachable before QA Wolf is notified. | ||
| - A prior job (such as `wait-for-preview-environment`) ensures the preview environment is fully deployed and reachable before QA Wolf is notified. | ||
|
|
||
| When the pull request enters the merge queue, this workflow sends the preview URL to QA Wolf, which starts a test run against that environment. | ||
|
|
||
| ## Require QA Wolf tests before merge | ||
| ### Require QA Wolf tests before merge | ||
|
|
||
| <Steps> | ||
| <Step> | ||
| Open your **GitHub repository** in the browser. | ||
| </Step> | ||
| <Step> | ||
| Click the **Settings** tab at the top of the repository (next to _Code, Issues, Pull requests_). | ||
| </Step> | ||
| <Step> | ||
| In the left sidebar, do one of the following: | ||
|
|
||
| - Click **Rules** (if your repo uses GitHub's new rulesets), or | ||
| - Click **Branches** (for classic branch protection rules). | ||
| </Step> | ||
| <Step> | ||
| Create or edit the rule that applies to your main branch. | ||
| </Step> | ||
| <Step> | ||
| Enable **Require status checks to pass**. | ||
| </Step> | ||
| <Step> | ||
| Add **QA Wolf Test Results** to the list of required checks. | ||
| </Step> | ||
| <Step> | ||
| Save the rule. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Verify your PR testing setup | ||
|
|
@@ -136,10 +134,6 @@ When the pull request enters the merge queue, this workflow sends the preview UR | |
| In the **QA Wolf app**, go to the **Runs** tab and verify that a new run starts for the preview environment associated with the pull request. | ||
| </Step> | ||
| <Step title="Confirm the check updates before merge."> | ||
| Back in **GitHub**, watch the **QA Wolf Test Results** check update from its placeholder state to the final pass or fail result. | ||
|
|
||
| The merge completes only after this check finishes successfully. | ||
| Back in **GitHub**, watch the **QA Wolf Test Results** check update from its placeholder state to the final pass or fail result. The merge completes only after this check finishes successfully. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| \\ | ||
| </Steps> | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"team" -> "workspace"
Maybe: