Skip to content

Commit

Permalink
Merge branch 'master' into chore/sc-28761/super-about-fit-and-finish-…
Browse files Browse the repository at this point in the history
…page-title
  • Loading branch information
stevekaplan123 committed Jan 22, 2025
2 parents c59bb70 + a3b300b commit 7e68867
Show file tree
Hide file tree
Showing 93 changed files with 3,513 additions and 1,380 deletions.
56 changes: 44 additions & 12 deletions .github/workflows/continuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,33 @@ jobs:
- name: Handle Jest Test Results
run: cat /home/runner/jestResults.json; STATUS=`jq ".numFailedTestSuites" /home/runner/jestResults.json`; exit $STATUS
if: ${{ always() }}
check-python-files:
runs-on: ubuntu-latest
outputs:
python_files_changed: ${{ steps.check-python-files.outputs.python_files_changed }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for Python file changes
id: check-python-files
uses: dorny/paths-filter@v2
with:
filters: |
python_files_changed:
- added|modified:
- '**/*.py'
- 'requirements.txt'
- 'setup.py'
- 'pyproject.toml'
sandbox-deploy:
name: "Continuous Testing: Sandbox Deploy"
concurrency:
group: dev-mongo
cancel-in-progress: false
needs: [ build-derived ]
if: github.event.pull_request.draft == false
needs: [ build-derived, check-python-files ]
if: >
github.event.pull_request.draft == false &&
needs.check-python-files.outputs.python_files_changed == 'true'
runs-on: ubuntu-latest
permissions:
contents: 'read'
Expand Down Expand Up @@ -236,7 +256,9 @@ jobs:
PROJECT_ID: "${{ secrets.DEV_PROJECT }}"
NAMESPACE: "${{secrets.DEV_SANDBOX_NAMESPACE}}"
sandbox-ready:
if: github.event.pull_request.draft == false
if: >
github.event.pull_request.draft == false &&
needs.check-python-files.outputs.python_files_changed == 'true'
needs: sandbox-deploy
runs-on: ubuntu-latest
steps:
Expand All @@ -256,8 +278,10 @@ jobs:
concurrency:
group: dev-mongo
cancel-in-progress: false
needs: [ sandbox-ready ]
if: github.event.pull_request.draft == false
needs: [ sandbox-ready, check-python-files ]
if: >
github.event.pull_request.draft == false &&
needs.check-python-files.outputs.python_files_changed == 'true'
permissions:
contents: 'read'
id-token: 'write'
Expand Down Expand Up @@ -376,11 +400,17 @@ jobs:
run: helm delete sandbox-${{ steps.get-sha.outputs.sha_short }} -n ${{ secrets.DEV_SANDBOX_NAMESPACE }} --debug --timeout 10m0s
if: steps.get-helm.outputs.count > 0
continuous-branch-protection:
needs: [ build-generic, build-derived, sandbox-deploy, sandbox-ready, pytest-job ]
needs:
- build-generic
- build-derived
- check-python-files
- sandbox-deploy
- sandbox-ready
- pytest-job
runs-on: ubuntu-latest
if: always()
steps:
- name:
- name:
run: |
if [ "${{ github.event_name }}" == "merge_group" ]; then
exit 0
Expand All @@ -391,10 +421,12 @@ jobs:
exit 1
fi
if [ "${{ github.event.pull_request.draft }}" == "false" ]; then
if [ "${{ needs.sandbox-deploy.result }}" != "success" ] || \
[ "${{ needs.sandbox-ready.result }}" != "success" ] || \
[ "${{ needs.pytest-job.result }}" != "success" ]; then
echo "One or more test jobs failed"
exit 1
if [ "${{ needs.check-python-files.outputs.python_files_changed }}" == "true" ]; then
if [ "${{ needs.sandbox-deploy.result }}" != "success" ] || \
[ "${{ needs.sandbox-ready.result }}" != "success" ] || \
[ "${{ needs.pytest-job.result }}" != "success" ]; then
echo "One or more Python-related test jobs failed"
exit 1
fi
fi
fi
17 changes: 11 additions & 6 deletions .github/workflows/integration-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency: integration_environment

jobs:
variables:
if: ${{ github.event_name == 'merge_group' }}
if: ${{ github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
date: ${{ steps.data.outputs.date }}
Expand All @@ -29,7 +29,7 @@ jobs:
echo "current_branch=merge-queue"
>> $GITHUB_OUTPUT
build-generic:
if: ${{ github.event_name == 'merge_group' }}
if: ${{ github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' }}
name: "Integration Image Build"
needs:
- variables
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-derived:
if: ${{ github.event_name == 'merge_group' }}
if: ${{ github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
name: "Integration Image Build Stage 2"
permissions:
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
run-tests:
if: ${{ github.event_name == 'merge_group' }}
if: ${{ github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' }}
name: "Playwright" # This name is referenced when slacking status
needs:
- build-derived
Expand Down Expand Up @@ -193,7 +193,12 @@ jobs:

- name: Run Playwright tests
run: npx playwright test

env:
PLAYWRIGHT_SUPERUSER_EMAIL: "${{ secrets.PLAYWRIGHT_SUPERUSER_EMAIL }}"
PLAYWRIGHT_SUPERUSER_PASSWORD: "${{ secrets.PLAYWRIGHT_SUPERUSER_PASSWORD }}"
PLAYWRIGHT_USER_EMAIL: "${{ secrets.PLAYWRIGHT_USER_EMAIL }}"
PLAYWRIGHT_USER_PASSWORD: "${{ secrets.PLAYWRIGHT_USER_PASSWORD }}"

- name: Upload Playwright report
uses: actions/upload-artifact@v3
if: always()
Expand All @@ -204,7 +209,7 @@ jobs:
- name: Uninstall
run: helm delete integration-${{ needs.variables.outputs.commit }} -n ${{ secrets.DEV_SANDBOX_NAMESPACE }} --debug --timeout 10m0s
ending-notification:
if: ${{ github.event_name == 'merge_group' }}
if: ${{ github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
needs:
- run-tests
Expand Down
Loading

0 comments on commit 7e68867

Please sign in to comment.