Skip to content

Commit

Permalink
chore: tune smoke test invocation (#1017)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi authored Jul 2, 2024
1 parent b6bf390 commit 231ad56
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 70 deletions.
56 changes: 56 additions & 0 deletions .github/actions/smoke-test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Smoke Test
description: End-to-end smoke tests

inputs:
env:
description: 'Env name'
required: true
projectToken:
description: 'Chromatic project token'
required: true

runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version-file: "client/.nvmrc"
cache: "npm"
cache-dependency-path: "client/package-lock.json"
- name: Install dependencies
shell: bash
working-directory: ./client
run: |
npm ci
npx playwright install --with-deps
# Run e2e tests
- name: Run e2e tests
shell: bash
working-directory: ./client
run: |
npm run e2e-${{ inputs.env }}
- name: Publish to Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ inputs.projectToken }}
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
2 changes: 1 addition & 1 deletion .github/workflows/argus-stack-prod-upsert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Upsert Prod Stack
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.23.0
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.24.0
with:
appName: single-cell-explorer
envName: prod
2 changes: 1 addition & 1 deletion .github/workflows/argus-stack-rdev-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Create Stack
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.23.0
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.24.0
with:
appName: single-cell-explorer
envName: rdev
2 changes: 1 addition & 1 deletion .github/workflows/argus-stack-rdev-delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Delete Stack
uses: chanzuckerberg/argus-artifacts/ci/packages/delete-stack@v0.23.0
uses: chanzuckerberg/argus-artifacts/ci/packages/delete-stack@v0.24.0
with:
appName: single-cell-explorer
envName: rdev
20 changes: 15 additions & 5 deletions .github/workflows/argus-stack-staging-upsert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,25 @@ jobs:

steps:
- name: Upsert Staging Stack
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.23.0
uses: chanzuckerberg/argus-artifacts/ci/packages/create-stack@v0.24.0
with:
appName: single-cell-explorer
envName: staging
waitForDeploymentSeconds: 300
postStackDetails: false

staging_smoke_test:
uses: ./.github/workflows/workflow-smoke-test.yaml
needs: staging_stack_upsert
secrets: inherit
with:
env: stage
# (thuang): We now run the smoke tests against 2 datasets sequentially, so need longer timeout
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Staging Smoke Tests
uses: ./.github/actions/smoke-test
with:
env: stage
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
61 changes: 0 additions & 61 deletions .github/workflows/workflow-smoke-test.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .infra/rdev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ stack:
services:
explorer:
image:
tag: sha-ac8da63f
tag: sha-1cad3591
replicaCount: 1
env:
# env vars common to all deployment stages
Expand Down

0 comments on commit 231ad56

Please sign in to comment.