-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore: configure e2e tests to run against staging before prod can deploy #1012
Changes from all commits
3e07a6a
65ce2f5
19894fe
ea07b3d
15ed715
312771f
bc52d78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,22 @@ on: | |
pull_request: | ||
types: [ labeled, synchronize ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
create-rdev-stack: | ||
runs-on: [ARM64, self-hosted, Linux] | ||
if: contains(github.event.pull_request.labels.*.name, 'stack') | ||
permissions: | ||
id-token: write | ||
contents: read | ||
id-token: write | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Create Stack | ||
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.19.1 | ||
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.23.0 | ||
Comment on lines
+7
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. upgrade, not related to e2e tests |
||
with: | ||
appName: single-cell-explorer | ||
envName: rdev |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,13 @@ jobs: | |
runs-on: [ARM64, self-hosted, Linux] | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'stack') || github.event.pull_request.state == 'closed' }} | ||
permissions: | ||
id-token: write | ||
contents: read | ||
id-token: write | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Delete Stack | ||
uses: chanzuckerberg/argus-artifacts/ci/packages/delete-stack@v0.19.1 | ||
uses: chanzuckerberg/argus-artifacts/ci/packages/delete-stack@v0.23.0 | ||
Comment on lines
+12
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. upgrade, not related to e2e tests |
||
with: | ||
appName: single-cell-explorer | ||
envName: rdev |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ on: | |
- '.infra/common.yaml' | ||
- '.infra/staging/values.yaml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run_if: | ||
if: github.head_ref == 'release-please--branches--main' | ||
|
@@ -17,19 +21,21 @@ jobs: | |
needs: run_if | ||
runs-on: [ARM64, self-hosted, Linux] | ||
permissions: | ||
id-token: write | ||
contents: read | ||
id-token: write | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Upsert Staging Stack | ||
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.19.1 | ||
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.23.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. upgrade, not related to e2e tests |
||
with: | ||
appName: single-cell-explorer | ||
envName: staging | ||
waitForDeploymentSeconds: 300 | ||
|
||
- name: Wait for Stating Stack to become Healthy | ||
id: wait | ||
uses: chanzuckerberg/argus-artifacts/ci/packages/wait-for-deployment@v0.19.1 | ||
with: | ||
appName: single-cell-explorer | ||
envName: staging | ||
staging_smoke_test: | ||
uses: ./.github/workflows/workflow-smoke-test.yaml | ||
needs: staging_stack_upsert | ||
secrets: inherit | ||
with: | ||
env: stage | ||
Comment on lines
+34
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wait for healthy staging deployment and then run smoke tests against it |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Smoke Test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copied from |
||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
env: | ||
description: 'Env name' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
smoke-test: | ||
# (thuang): We now run the smoke tests against 2 datasets sequentially, so need longer timeout | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ./client | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "client/.nvmrc" | ||
cache: "npm" | ||
cache-dependency-path: "client/package-lock.json" | ||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
npx playwright install --with-deps | ||
|
||
# Run e2e tests | ||
- name: Run e2e tests | ||
run: | | ||
npm run e2e-${{ inputs.env }} | ||
|
||
- name: Publish to Chromatic | ||
uses: chromaui/action@latest | ||
with: | ||
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
workingDir: ./client | ||
# This is `npm run build-archive-storybook` | ||
buildScriptName: "build-archive-storybook" | ||
|
||
- name: Upload FE test results as an artifact | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: playwright-report | ||
path: ~/**/playwright-report/* | ||
retention-days: 14 | ||
|
||
- name: Upload blob report to GitHub Actions Artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: all-blob-reports | ||
path: ~/**/blob-report/* | ||
retention-days: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upgrade, not related to e2e tests