Skip to content

Commit

Permalink
Test dev + prod
Browse files Browse the repository at this point in the history
  • Loading branch information
zxl629 committed Jan 4, 2025
1 parent f505257 commit c571c9f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/callable-local-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,35 +62,35 @@ jobs:
uses: ./amplify-data/.github/actions/load-verdaccio-with-amplify-data
- name: Make script executable
run: chmod +x ./amplify-data/scripts/retry-npm-script.sh
# - name: Run cypress tests for webpack e2e test dev
# shell: bash
# working-directory: ./amplify-data
# env:
# E2E_FRAMEWORK: ${{ inputs.framework }}
# E2E_SAMPLE_NAME: ${{ matrix.sample_name }}
# E2E_SPEC: ${{ inputs.spec }}
# E2E_BROWSER: ${{ matrix.browser }}
# E2E_BACKEND: ${{ inputs.backend }}
# E2E_RETRY_COUNT: ${{ inputs.retry_count }}
# E2E_TEST_NAME: ${{ inputs.test_name }}
# E2E_NPM_SCRIPT: ${{ inputs.npm_script }}
# E2E_ENV: ${{ inputs.env }}
# run: |
# if [ -z "$E2E_NPM_SCRIPT" ]; then
# ../amplify-data/scripts/retry-npm-script.sh -s \
# "ci:test \
# $E2E_FRAMEWORK \
# $E2E_SAMPLE_NAME \
# $E2E_SPEC \
# $E2E_BROWSER \
# dev \
# $E2E_BACKEND \
# --env $(echo $E2E_ENV | jq -r 'tostring')" \
# $E2E_NPM_SCRIPT \
# -n $E2E_RETRY_COUNT
# else
# echo "Skipping specialized yarn script execution in the dev environment."
# fi
- name: Run cypress tests for webpack e2e test dev
shell: bash
working-directory: ./amplify-data
env:
E2E_FRAMEWORK: ${{ inputs.framework }}
E2E_SAMPLE_NAME: ${{ matrix.sample_name }}
E2E_SPEC: ${{ inputs.spec }}
E2E_BROWSER: ${{ matrix.browser }}
E2E_BACKEND: ${{ inputs.backend }}
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
E2E_TEST_NAME: ${{ inputs.test_name }}
E2E_NPM_SCRIPT: ${{ inputs.npm_script }}
E2E_ENV: ${{ inputs.env }}
run: |
if [ -z "$E2E_NPM_SCRIPT" ]; then
../amplify-data/scripts/retry-npm-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_SAMPLE_NAME \
$E2E_SPEC \
$E2E_BROWSER \
dev \
$E2E_BACKEND \
--env $(echo $E2E_ENV | jq -r 'tostring')" \
$E2E_NPM_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-data
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const runAppOnProd = ({ framework, sample, backend, env }) => {
const command = [
envVars && `export ${envVars}`,
install,
`npm run ${buildCommand} --prefix ${sampleDir}`,
`npm --prefix ${sampleDir} run ${buildCommand}`,
serveCommand,
]
.filter(Boolean)
Expand Down

0 comments on commit c571c9f

Please sign in to comment.