Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 5151598

Browse files
authored
Check Applitools env variable before running tests (#321)
1 parent 632a84a commit 5151598

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

circle.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,16 @@ workflows:
223223
verify-command: echo 'Already verified'
224224
no-workspace: true
225225
working_directory: examples/visual-testing-with-applitools
226-
command: npm test
226+
# to correctly run this job, we need Applitools token
227+
# external pull requests do not have environment variables set
228+
# thus the job will always fail. Let's skip this job if the
229+
# environment variable is missing
230+
command: |
231+
if [ -z "$APPLITOOLS_API_KEY" ]; then
232+
echo "Skipping Applitools test job, missing environment variable APPLITOOLS_API_KEY"
233+
else
234+
npm test
235+
fi
227236
store_artifacts: true
228237

229238
- cypress/run:

0 commit comments

Comments
 (0)