Skip to content
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

Build FE on FE changes #11422

Merged
merged 9 commits into from
Mar 25, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ jobs:
## Frontend Test
# In case of self-hosted EC2 errors, remove this block.
start-frontend-test-runner:
name: "Frontend: Start Test EC2 Runner"
name: "Frontend: 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: |
Expand All @@ -292,11 +292,10 @@ jobs:
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }}
frontend-test:
name: "Frontend: Run Test"
needs: start-frontend-test-runner # required to start the main job when the runner is ready
runs-on: ${{ needs.start-frontend-test-runner.outputs.label }} # run the job on the newly created runner
timeout-minutes: 120
frontend-prepare:
Copy link
Contributor

@davinchia davinchia Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I recommend combing the frontend-prepare with the frontend-build job into a single frontend-build job. I don't think there is value to separating these out as jobs. This helps declutter the github actions summary & simplifies the needs block in the stop runner job.

name: "Frontend: Prepare build environment"
needs: start-frontend-test-runner
runs-on: ${{ needs.start-frontend-test-runner.outputs.label }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
Expand Down Expand Up @@ -327,7 +326,19 @@ jobs:
org.gradle.workers.max=8
org.gradle.vfs.watch=false
EOF

frontend-build:
name: "Frontend: Build"
needs: frontend-prepare # required to start the main job when the runner is ready
runs-on: ${{ needs.start-frontend-test-runner.outputs.label }}
steps:
- name: Build :airbyte-webapp
run: SUB_BUILD=PLATFORM ./gradlew --no-daemon :airbyte-webapp:build --scan
frontend-test:
name: "Frontend: Run End-to-End Tests"
needs: frontend-build # required to start the main job when the runner is ready
runs-on: ${{ needs.start-frontend-test-runner.outputs.label }} # run the job on the newly created runner
timeout-minutes: 120
steps:
- name: Build Platform Docker Images
run: SUB_BUILD=PLATFORM ./gradlew --no-daemon assemble --scan

Expand All @@ -337,11 +348,13 @@ jobs:
run: ./tools/bin/e2e_test.sh
# In case of self-hosted EC2 errors, remove this block.
stop-frontend-test-runner:
name: "Frontend: Stop Test Runner"
name: "Frontend: Stop Runner"
timeout-minutes: 10
needs:
- start-frontend-test-runner # required to get output from the start-runner job
- frontend-test # required to wait when the main job is done
- frontend-prepare
- 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.
Expand Down