forked from adobecom/nala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runScreenDiff.sh
31 lines (25 loc) · 891 Bytes
/
runScreenDiff.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Replace these variables with your actual values
Config="visual"
Project="chrome,ipad,iphone"
# Check if category is passed as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <category>"
exit 1
fi
category="$1"
# Only install dependencies if running in GitHub Actions
if [ -n "$GITHUB_ACTIONS" ]; then
echo "*** Installing playwright dependencies ***"
cd "$GITHUB_ACTION_PATH" || exit
npm ci
npx playwright install --with-deps
else
echo "Skipping dependency installation - not running in GitHub Actions"
fi
# Run each command one by one
node run.js -c ${Config} -p ${Project} -g @${category}-screenshots
node libs/screenshot/merge.js screenshots/${category}
node libs/screenshot/compare.mjs screenshots/${category}
node libs/screenshot/uploads3Public.js screenshots/${category}
echo "All commands executed successfully for category: ${category}!"