-
Notifications
You must be signed in to change notification settings - Fork 8
/
run-all-cores.sh
executable file
·37 lines (31 loc) · 1 KB
/
run-all-cores.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
32
33
34
35
36
37
#!/bin/bash
MAJOR_VERSIONS="5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5"
TRUNK="master:6.6"
VERSIONS=""
for MAJOR_VERSION in $MAJOR_VERSIONS; do
# This ensures the latest patch version is used.
VERSIONS="$VERSIONS $MAJOR_VERSION-branch:$MAJOR_VERSION"
done
VERSIONS="$TRUNK $VERSIONS"
echo "Running tests for the following core versions: $VERSIONS"
SPEC="-- --quiet"
while getopts s: flag
do
case "${flag}" in
s) SPEC="-- --quiet --spec $OPTARG";;
esac
done
for VERSION in $VERSIONS; do
CORE=$(echo $VERSION|cut -d ":" -f 1)
NUMBER=$(echo $VERSION|cut -d ":" -f 2)
[[ -z "$NUMBER" ]] && NUMBER="$CORE"
echo "**********************************************"
echo "Core: $CORE, Version number: $NUMBER"
echo "**********************************************"
./tests/bin/set-core-version.js $CORE
npm run env:start > /dev/null
npm run env run tests-cli "core update-db" > /dev/null
npm run env clean > /dev/null
CYPRESS_WORDPRESS_CORE="$NUMBER" npm run cypress:run $SPEC
npm run env:stop > /dev/null
done