-
Notifications
You must be signed in to change notification settings - Fork 0
feat(PLT-886): add shared workflow for running Deep Purple on PR changes #120
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3a7c389
feat(PLT-886): add shared workflow for running Deep Purple on PR changes
kb-typeform 4f0ddce
added symlink to new reusable workflow
kb-typeform 858daea
simplify options
kb-typeform b2a0a23
add secrets
kb-typeform 77f46e4
add secrets
kb-typeform 9b68311
add secrets
kb-typeform 9306fc2
add secrets
kb-typeform dbbcdda
add secrets
kb-typeform 341bd0e
set MANUAL_BUILD to true
kb-typeform f538ea9
use jq instead of grep
kb-typeform 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Deep Purple E2E Test Runner (Frontend Apps Only) | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
CLOUDFLARE_BYPASS_TOKEN: | ||
required: true | ||
PROD_BASIC_PASSWORD: | ||
required: true | ||
PROD_PAID_PASSWORD: | ||
required: true | ||
|
||
jobs: | ||
run-deep-purple-tests: | ||
name: Run Deep Purple Tests Against Changes | ||
runs-on: [self-hosted, ci-universal] | ||
|
||
env: | ||
DOCKER_IMAGE: 567716553783.dkr.ecr.us-east-1.amazonaws.com/deep-purple:latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract app name from package.json | ||
run: | | ||
echo "APP_NAME=$(jq -r '.name' package.json | sed 's/@typeform\///')" >> $GITHUB_ENV | ||
|
||
- name: Print extracted app name | ||
run: echo "Extracted APP_NAME is ${{ env.APP_NAME }}" | ||
|
||
- name: Create test-results directory | ||
run: mkdir -p ${{ github.workspace }}/test-results | ||
|
||
- name: Run Deep Purple tests | ||
run: | | ||
docker run --name deep-purple-container \ | ||
-v ${{ github.workspace }}/test-results:/home/pwuser/test-results \ | ||
-e CLOUDFLARE_BYPASS_TOKEN=${{ secrets.CLOUDFLARE_BYPASS_TOKEN }} \ | ||
-e PROD_BASIC_PASSWORD=${{ secrets.PROD_BASIC_PASSWORD }} \ | ||
-e PROD_PAID_PASSWORD=${{ secrets.PROD_PAID_PASSWORD }} \ | ||
-e PREVIEW_APP_NAME="${{ env.APP_NAME }}" \ | ||
-e PREVIEW_APP_VERSION="${{ github.sha }}" \ | ||
-e MANUAL_BUILD=true \ | ||
-e SKIP_SEND_NOTIFICATIONS=true \ | ||
${{ env.DOCKER_IMAGE }} \ | ||
yarn test:all | ||
sleep 5 # Give container some time to start | ||
|
||
- name: Post test report to PR comments | ||
uses: ctrf-io/github-test-reporter@v1 | ||
with: | ||
report-path: "${{ github.workspace }}/test-results/*.json" | ||
pull-request-report: true | ||
overwrite-comment: true | ||
exit-on-fail: true | ||
title: "Deep Purple Results" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: always() |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.github/workflows/deep-purple-checks.yml |
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.
Uh oh!
There was an error while loading. Please reload this page.