-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run playwright tests in our gha integration test workflow (#1132)
* run playwright tests after S&R tests in the gha k8s instance * ensure maildev is forwarded properly * install dependancies during playwright setup * fix email base url for gha environment * fix regex used for AddMemberModal tests * ensure return to path used in LoginRedirect is relative for invite emails * Exclude viewer page playwright tests in GHA because Mongo is not available * Run Playwright tests even if dotnet tests fail * use develop image tag for lexbox-hgweb and fw-headless in gha integration tests * remove unused environment variables from frontend tests * pull playwright tests into a reusable action and call them from both staging and gha integration tests --------- Co-authored-by: Tim Haasdyk <[email protected]>
- Loading branch information
Showing
8 changed files
with
175 additions
and
141 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Setup and run playwright tests | ||
inputs: | ||
lexbox-hostname: | ||
description: 'The hostname of the lexbox server, should include port if not 80' | ||
required: true | ||
lexbox-default-password: | ||
description: 'The default password for the lexbox server' | ||
required: true | ||
viewer-tests: | ||
description: 'Whether to run viewer tests' | ||
required: false | ||
default: 'true' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# First we need to setup Node... | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'frontend/package.json' | ||
# Then we can set up pnpm... | ||
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 | ||
with: | ||
package_json_file: 'frontend/package.json' | ||
# Then we can have Node set up package caching | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'frontend/package.json' | ||
cache: 'pnpm' | ||
cache-dependency-path: 'frontend/pnpm-lock.yaml' | ||
- name: Playwright setup | ||
shell: bash | ||
working-directory: frontend | ||
run: pnpm install | ||
- name: Set up Playwright dependencies | ||
shell: bash | ||
working-directory: frontend | ||
run: pnpm exec playwright install --with-deps | ||
|
||
- name: Integration tests (Playwright) | ||
id: playwright-tests | ||
shell: bash | ||
env: | ||
TEST_SERVER_HOSTNAME: ${{ inputs.lexbox-hostname }} | ||
TEST_DEFAULT_PASSWORD: ${{ inputs.lexbox-default-password }} | ||
working-directory: frontend | ||
run: pnpm run test ${{ inputs.viewer-tests != 'true' && '-g "^(?!.*Viewer Page).*"' || '' }} | ||
|
||
- name: Upload playwright results | ||
if: ${{ always() && steps.playwright-tests.outcome != 'skipped' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: playwright-traces | ||
path: | | ||
./frontend/test-results |
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