Skip to content

Commit

Permalink
chore: Bring back merge queues (#15177)
Browse files Browse the repository at this point in the history
* chore: Bring back merge queues

* Removed lint as pre-req for integration test

* Cleaned up warnings
  • Loading branch information
keithwillcode authored May 23, 2024
1 parent 49df99c commit ba06c6c
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 69 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/all-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: All checks

on:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
type-check:
name: Type check
uses: ./.github/workflows/check-types.yml
secrets: inherit

lint:
name: Linters
uses: ./.github/workflows/lint.yml
secrets: inherit

unit-test:
name: Tests
uses: ./.github/workflows/unit-tests.yml
secrets: inherit

build-api-v1:
name: Production builds
uses: ./.github/workflows/api-v1-production-build.yml
secrets: inherit

build-api-v2:
name: Production builds
uses: ./.github/workflows/api-v2-production-build.yml
secrets: inherit

build:
name: Production builds
uses: ./.github/workflows/production-build-without-database.yml
secrets: inherit

integration-test:
name: Tests
needs: [lint, build, build-api-v1, build-api-v2]
uses: ./.github/workflows/integration-tests.yml
secrets: inherit

e2e:
name: Tests
needs: [lint, build, build-api-v1, build-api-v2]
uses: ./.github/workflows/e2e.yml
secrets: inherit

e2e-app-store:
name: Tests
needs: [lint, build, build-api-v1, build-api-v2]
uses: ./.github/workflows/e2e-app-store.yml
secrets: inherit

e2e-embed:
name: Tests
needs: [lint, build, build-api-v1, build-api-v2]
uses: ./.github/workflows/e2e-embed.yml
secrets: inherit

e2e-embed-react:
name: Tests
needs: [lint, build, build-api-v1, build-api-v2]
uses: ./.github/workflows/e2e-embed-react.yml
secrets: inherit

analyze:
name: Analyze Build
needs: [build]
uses: ./.github/workflows/nextjs-bundle-analysis.yml
secrets: inherit

required:
needs: [lint, type-check, unit-test, integration-test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
if: always()
runs-on: buildjet-2vcpu-ubuntu-2204
steps:
- name: fail if conditional jobs failed
run: exit 1
15 changes: 8 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/cache-db
- name: Run Tests
run: yarn test -- --integrationTestsOnly
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results
# TODO: Generate test results so we can upload them
# - name: Upload Test Results
# if: ${{ always() }}
# uses: actions/upload-artifact@v4
# with:
# name: test-results
# path: test-results
67 changes: 5 additions & 62 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request_target:
branches:
- main
merge_group:
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -35,85 +34,29 @@ jobs:
uses: ./.github/workflows/check-types.yml
secrets: inherit

unit-test:
name: Tests
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/unit-tests.yml
secrets: inherit

lint:
name: Linters
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/lint.yml
secrets: inherit

build-api-v1:
name: Production builds
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/api-v1-production-build.yml
secrets: inherit

build-api-v2:
name: Production builds
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/api-v2-production-build.yml
secrets: inherit

build:
name: Production builds
unit-test:
name: Tests
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/production-build-without-database.yml
uses: ./.github/workflows/unit-tests.yml
secrets: inherit

integration-test:
name: Tests
needs: [changes, lint, build, build-api-v1, build-api-v2]
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/integration-tests.yml
secrets: inherit

e2e:
name: Tests
needs: [changes, lint, build, build-api-v1, build-api-v2]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e.yml
secrets: inherit

e2e-app-store:
name: Tests
needs: [changes, lint, build, build-api-v1, build-api-v2]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e-app-store.yml
secrets: inherit

e2e-embed:
name: Tests
needs: [changes, lint, build, build-api-v1, build-api-v2]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e-embed.yml
secrets: inherit

e2e-embed-react:
name: Tests
needs: [changes, lint, build, build-api-v1, build-api-v2]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e-embed-react.yml
secrets: inherit

analyze:
name: Analyze Build
needs: [changes, build]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/nextjs-bundle-analysis.yml
secrets: inherit

required:
needs: [changes, lint, type-check, unit-test, integration-test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
needs: [changes, lint, type-check, unit-test, integration-test]
if: always()
runs-on: buildjet-2vcpu-ubuntu-2204
steps:
Expand Down

0 comments on commit ba06c6c

Please sign in to comment.