Skip to content
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(repo): add ssr two clients E2E #13482

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/integ-config/integ-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -839,3 +839,13 @@ tests:
# sample_name: duplicate-packages
# spec: duplicate-packages
# browser: *minimal_browser_list

# 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
yarn_script: ci:ssr-context-isolation
browser: [chrome]
60 changes: 37 additions & 23 deletions .github/workflows/callable-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ on:
retry_count:
required: true
type: number
yarn_script:
required: false
type: string

env:
AMPLIFY_DIR: /home/runner/work/amplify-js/amplify-js/amplify-js
Expand Down Expand Up @@ -80,19 +83,24 @@ jobs:
E2E_AMPLIFY_JS_DIR: ${{ inputs.amplifyjs_dir == true && env.AMPLIFY_DIR || ''}}
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
E2E_TEST_NAME: ${{ inputs.test_name }}
E2E_YARN_SCRIPT: ${{ inputs.yarn_script }}
run: |
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
$E2E_SAMPLE_NAME \
$E2E_SPEC \
$E2E_BROWSER \
dev \
$E2E_BACKEND \
$E2E_AMPLIFY_JS_DIR" \
-n $E2E_RETRY_COUNT
if [ -z "$E2E_YARN_SCRIPT" ]; then
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
$E2E_SAMPLE_NAME \
$E2E_SPEC \
$E2E_BROWSER \
dev \
$E2E_BACKEND \
$E2E_AMPLIFY_JS_DIR" \
$E2E_YARN_SCRIPT \
-n $E2E_RETRY_COUNT
else
echo "Skipping specialized yarn script execution in the dev environment."
fi
- name: Run cypress tests for ${{ inputs.test_name }} prod
shell: bash
working-directory: amplify-js-samples-staging
Expand All @@ -106,18 +114,24 @@ jobs:
E2E_AMPLIFY_JS_DIR: ${{ inputs.amplifyjs_dir == true && env.AMPLIFY_DIR || ''}}
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
E2E_TEST_NAME: ${{ inputs.test_name }}
E2E_YARN_SCRIPT: ${{ inputs.yarn_script }}
run: |
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
$E2E_SAMPLE_NAME \
$E2E_SPEC \
$E2E_BROWSER \
prod \
$E2E_BACKEND \
$E2E_AMPLIFY_JS_DIR" \
-n $E2E_RETRY_COUNT
if [ -z "$E2E_YARN_SCRIPT" ]; then
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
$E2E_SAMPLE_NAME \
$E2E_SPEC \
$E2E_BROWSER \
prod \
$E2E_BACKEND \
$E2E_AMPLIFY_JS_DIR" \
$E2E_YARN_SCRIPT \
-n $E2E_RETRY_COUNT
else
yarn "$E2E_YARN_SCRIPT"
fi
- name: Upload artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
if: failure()
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/callable-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
backend: ${{ matrix.integ-config.backend }}
timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 35 }}
retry_count: ${{ matrix.integ-config.retry_count || 3 }}
yarn_script: ${{ matrix.integ-config.yarn_script || '' }}

# e2e-test-runner-headless:
# name: E2E test runnner_headless
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-github-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for (const file of [...workflowYmlFiles, ...actionYmlFiles]) {
const runCommandValues = getKeyValuesFor('run', ymlContents);
for (const val of runCommandValues) {
if (val.match(variableTemplatePattern)) {
console.log(`There is an inline variabled used in ${file}`);
console.log(`There is an inline variable used in ${file}`);
exitCode = 1;
}
}
Expand Down
Loading