Skip to content

Commit c571c9f

Browse files
committed
Test dev + prod
1 parent f505257 commit c571c9f

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

.github/workflows/callable-local-e2e-test.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,35 +62,35 @@ jobs:
6262
uses: ./amplify-data/.github/actions/load-verdaccio-with-amplify-data
6363
- name: Make script executable
6464
run: chmod +x ./amplify-data/scripts/retry-npm-script.sh
65-
# - name: Run cypress tests for webpack e2e test dev
66-
# shell: bash
67-
# working-directory: ./amplify-data
68-
# env:
69-
# E2E_FRAMEWORK: ${{ inputs.framework }}
70-
# E2E_SAMPLE_NAME: ${{ matrix.sample_name }}
71-
# E2E_SPEC: ${{ inputs.spec }}
72-
# E2E_BROWSER: ${{ matrix.browser }}
73-
# E2E_BACKEND: ${{ inputs.backend }}
74-
# E2E_RETRY_COUNT: ${{ inputs.retry_count }}
75-
# E2E_TEST_NAME: ${{ inputs.test_name }}
76-
# E2E_NPM_SCRIPT: ${{ inputs.npm_script }}
77-
# E2E_ENV: ${{ inputs.env }}
78-
# run: |
79-
# if [ -z "$E2E_NPM_SCRIPT" ]; then
80-
# ../amplify-data/scripts/retry-npm-script.sh -s \
81-
# "ci:test \
82-
# $E2E_FRAMEWORK \
83-
# $E2E_SAMPLE_NAME \
84-
# $E2E_SPEC \
85-
# $E2E_BROWSER \
86-
# dev \
87-
# $E2E_BACKEND \
88-
# --env $(echo $E2E_ENV | jq -r 'tostring')" \
89-
# $E2E_NPM_SCRIPT \
90-
# -n $E2E_RETRY_COUNT
91-
# else
92-
# echo "Skipping specialized yarn script execution in the dev environment."
93-
# fi
65+
- name: Run cypress tests for webpack e2e test dev
66+
shell: bash
67+
working-directory: ./amplify-data
68+
env:
69+
E2E_FRAMEWORK: ${{ inputs.framework }}
70+
E2E_SAMPLE_NAME: ${{ matrix.sample_name }}
71+
E2E_SPEC: ${{ inputs.spec }}
72+
E2E_BROWSER: ${{ matrix.browser }}
73+
E2E_BACKEND: ${{ inputs.backend }}
74+
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
75+
E2E_TEST_NAME: ${{ inputs.test_name }}
76+
E2E_NPM_SCRIPT: ${{ inputs.npm_script }}
77+
E2E_ENV: ${{ inputs.env }}
78+
run: |
79+
if [ -z "$E2E_NPM_SCRIPT" ]; then
80+
../amplify-data/scripts/retry-npm-script.sh -s \
81+
"ci:test \
82+
$E2E_FRAMEWORK \
83+
$E2E_SAMPLE_NAME \
84+
$E2E_SPEC \
85+
$E2E_BROWSER \
86+
dev \
87+
$E2E_BACKEND \
88+
--env $(echo $E2E_ENV | jq -r 'tostring')" \
89+
$E2E_NPM_SCRIPT \
90+
-n $E2E_RETRY_COUNT
91+
else
92+
echo "Skipping specialized yarn script execution in the dev environment."
93+
fi
9494
- name: Run cypress tests for ${{ inputs.test_name }} prod
9595
shell: bash
9696
working-directory: ./amplify-data

scripts/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const runAppOnProd = ({ framework, sample, backend, env }) => {
140140
const command = [
141141
envVars && `export ${envVars}`,
142142
install,
143-
`npm run ${buildCommand} --prefix ${sampleDir}`,
143+
`npm --prefix ${sampleDir} run ${buildCommand}`,
144144
serveCommand,
145145
]
146146
.filter(Boolean)

0 commit comments

Comments
 (0)