-
Notifications
You must be signed in to change notification settings - Fork 4.6k
🪟 🔧 Run FE e2e tests on separate runner #21428
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 2 commits
Commits
Show all changes
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -442,11 +442,79 @@ jobs: | |
autoAcceptChanges: true | ||
exitOnceUploaded: true | ||
|
||
# In case of self-hosted EC2 errors, remove this block. | ||
stop-frontend-runner: | ||
name: "Frontend: Stop Runner" | ||
timeout-minutes: 10 | ||
needs: | ||
- start-frontend-runner # required to get output from the start-runner job | ||
- frontend-build # required to wait when then build job is done | ||
runs-on: ubuntu-latest | ||
# Always is required to stop the runner even if the previous job has errors. However always() runs even if the previous step is skipped. | ||
# Thus, we check for skipped here. | ||
if: ${{ always() && needs.start-frontend-runner.result != 'skipped'}} | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
- name: Check PAT rate limits | ||
run: | | ||
./tools/bin/find_non_rate_limited_PAT \ | ||
${{ secrets.AIRBYTEIO_PAT }} \ | ||
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \ | ||
${{ secrets.SUPERTOPHER_PAT }} \ | ||
${{ secrets.DAVINCHIA_PAT }} | ||
- name: Stop EC2 runner | ||
uses: supertopher/[email protected] | ||
with: | ||
mode: stop | ||
github-token: ${{ env.PAT }} | ||
label: ${{ needs.start-frontend-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-frontend-runner.outputs.ec2-instance-id }} | ||
|
||
## Frontend Test | ||
# In case of self-hosted EC2 errors, remove this block. | ||
start-frontend-e2e-runner: | ||
name: "Frontend E2E Tests: Start EC2 Runner" | ||
needs: | ||
- changes | ||
# Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master. | ||
if: | | ||
needs.changes.outputs.frontend == 'true' || needs.changes.outputs.build == 'true' || github.ref == 'refs/heads/master' | ||
|| (always() && needs.changes.outputs.backend == 'true') | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
label: ${{ steps.start-ec2-runner.outputs.label }} | ||
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} | ||
steps: | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
- name: Check PAT rate limits | ||
run: | | ||
./tools/bin/find_non_rate_limited_PAT \ | ||
${{ secrets.AIRBYTEIO_PAT }} \ | ||
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \ | ||
${{ secrets.SUPERTOPHER_PAT }} \ | ||
${{ secrets.DAVINCHIA_PAT }} | ||
- name: Start AWS Runner | ||
id: start-ec2-runner | ||
uses: ./.github/actions/start-aws-runner | ||
with: | ||
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} | ||
github-token: ${{ env.PAT }} | ||
|
||
frontend-test: | ||
name: "Frontend: Run End-to-End Tests" | ||
needs: | ||
- start-frontend-runner # required to have runner started | ||
runs-on: ${{ needs.start-frontend-runner.outputs.label }} # run the job on the newly created runner | ||
- start-frontend-e2e-runner # required to have runner started | ||
runs-on: ${{ needs.start-frontend-e2e-runner.outputs.label }} # run the job on the newly created runner | ||
timeout-minutes: 120 | ||
steps: | ||
- name: Checkout Airbyte | ||
|
@@ -505,18 +573,18 @@ jobs: | |
command: ./tools/bin/e2e_test.sh | ||
attempt_limit: 3 | ||
attempt_delay: 5000 # in ms | ||
|
||
# In case of self-hosted EC2 errors, remove this block. | ||
stop-frontend-runner: | ||
name: "Frontend: Stop Runner" | ||
stop-frontend-e2e-runner: | ||
name: "Frontend E2E Tests: Stop Runner" | ||
timeout-minutes: 10 | ||
needs: | ||
- start-frontend-runner # required to get output from the start-runner job | ||
- start-frontend-e2e-runner # required to get output from the start-runner job | ||
- frontend-test # required to wait when the e2e-test job is done | ||
- frontend-build # required to wait when then build job is done | ||
runs-on: ubuntu-latest | ||
# Always is required to stop the runner even if the previous job has errors. However always() runs even if the previous step is skipped. | ||
# Thus, we check for skipped here. | ||
if: ${{ always() && needs.start-frontend-runner.result != 'skipped'}} | ||
if: ${{ always() && needs.start-frontend-e2e-runner.result != 'skipped'}} | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
|
@@ -538,8 +606,8 @@ jobs: | |
with: | ||
mode: stop | ||
github-token: ${{ env.PAT }} | ||
label: ${{ needs.start-frontend-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-frontend-runner.outputs.ec2-instance-id }} | ||
label: ${{ needs.start-frontend-e2e-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-frontend-e2e-runner.outputs.ec2-instance-id }} | ||
|
||
## FOLLOWING BUILDS ARE ALL PLATFORM BUILDS. | ||
|
||
|
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.