-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add baseline functionality for running Playwright tests against live …
…environments (#5075) * Add HMAC signing capability for playwright tests * Add workflow to run Playwright smoketests in CI * Remove testing code for new workflow
- Loading branch information
1 parent
9e535c1
commit daf2545
Showing
73 changed files
with
451 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1312,6 +1312,22 @@ jobs: | |
wait_time: 60 # check every minute | ||
max_time: 1800 # allow up to 30 minutes for a deployment | ||
|
||
- name: Trigger staging Playwright smoketests | ||
uses: convictional/[email protected] | ||
with: | ||
owner: WordPress | ||
repo: openverse | ||
github_token: ${{ secrets.ACCESS_TOKEN }} | ||
workflow_file_name: playwright_deployment_smoketest.yml | ||
wait_interval: 60 | ||
# TODO: Set to true once we see that this test is stable, and we can fail the deployment if it fails. | ||
# @see https://github.com/WordPress/openverse/pull/4991 | ||
propagate_failure: false | ||
client_payload: | | ||
{ | ||
"service_url": "https://staging.openverse.org/" | ||
} | ||
- name: Trigger staging k6 load test | ||
uses: convictional/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Run Playwright smoketests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
service_url: | ||
description: "The service against which to run the Playwright smoketests." | ||
required: true | ||
type: string | ||
|
||
run-name: Playwright smoketests ${{ inputs.service_url }} | ||
|
||
# Disallow running multiple smoketests at once against the same service | ||
concurrency: ${{ github.workflow }}-${{ inputs.service_url }} | ||
|
||
jobs: | ||
smoketests: | ||
name: "Playwright smoketests ${{ inputs.service_url }}" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup CI env | ||
uses: ./.github/actions/setup-env | ||
with: | ||
setup_python: false | ||
install_recipe: node-install | ||
|
||
- name: Run playwright | ||
env: | ||
# The secret name is k6 but it's usable for anything sending HMAC signed requests | ||
HMAC_SIGNING_SECRET: ${{ secrets.K6_SIGNING_SECRET }} | ||
PLAYWRIGHT_BASE_URL: ${{ inputs.service_url }} | ||
run: | | ||
just p frontend test:playwright --grep '@deployment-smoketest' | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
id: test-results | ||
with: | ||
name: test_results | ||
path: frontend/test-results |
2 changes: 1 addition & 1 deletion
2
frontend/.remake/component-storybook-test/remake-fileName.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.