-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(repo): add ssr two clients E2E
- Loading branch information
Showing
3 changed files
with
96 additions
and
0 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,8 @@ | ||
tests: | ||
# SSR context isolation | ||
- test_name: integ_ssr_context_isolation | ||
desc: 'SSR Context Isolation' | ||
framework: next | ||
category: ssr-adapter | ||
sample_name: ssr-context-isolation | ||
spec: ssr-context-isolation |
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,70 @@ | ||
name: E2E Test Specialized | ||
run-name: e2e_specialized.${{ inputs.test_name }} | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
test_name: | ||
required: true | ||
type: string | ||
framework: | ||
required: true | ||
type: string | ||
category: | ||
required: true | ||
type: string | ||
sample_name: | ||
required: true | ||
type: string | ||
timeout_minutes: | ||
required: true | ||
type: number | ||
|
||
env: | ||
AMPLIFY_DIR: /home/runner/work/amplify-js/amplify-js/amplify-js | ||
CYPRESS_GOOGLE_CLIENTID: ${{ secrets.CYPRESS_GOOGLE_CLIENTID }} | ||
CYPRESS_GOOGLE_CLIENT_SECRET: ${{ secrets.CYPRESS_GOOGLE_CLIENT_SECRET }} | ||
CYPRESS_GOOGLE_REFRESH_TOKEN: ${{ secrets.CYPRESS_GOOGLE_REFRESH_TOKEN }} | ||
|
||
jobs: | ||
e2e-test: | ||
name: E2E Specialized ${{ inputs.test_name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
sample_name: | ||
- ${{ fromJson(inputs.sample_name) }} | ||
fail-fast: false | ||
timeout-minutes: ${{ inputs.timeout_minutes }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
path: amplify-js | ||
- name: Setup node and build the repository | ||
uses: ./amplify-js/.github/actions/node-and-build | ||
- name: Setup samples staging repository | ||
uses: ./amplify-js/.github/actions/setup-samples-staging | ||
with: | ||
GH_TOKEN_STAGING_READ: ${{ secrets.GH_TOKEN_STAGING_READ }} | ||
- name: Load Verdaccio with AmplifyJs | ||
uses: ./amplify-js/.github/actions/load-verdaccio-with-amplify-js | ||
- name: Run Sample | ||
shell: bash | ||
working-directory: amplify-js-samples-staging/samples/${{ inputs.framework }}/${{ inputs.category }}/${{ matrix.sample_name }} | ||
run: yarn run:sample | ||
- name: Run tests | ||
shell: bash | ||
working-directory: amplify-js-samples-staging | ||
run: chmod +x scripts/test-ssr-context-isolation.sh && yarn ci:ssr-context-isolation | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce | ||
if: failure() | ||
with: | ||
name: ${{ inputs.test_name }} | ||
if-no-files-found: ignore | ||
path: | | ||
amplify-js-samples-staging/cypress/videos | ||
amplify-js-samples-staging/cypress/screenshots | ||
retention-days: 14 |
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