mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Portable bin/test-with-real-projects.sh
This replaces hardcoded paths to Psalm with dynamically built ones and thus allows to run `bin/test-with-real-projects.sh` locally.
This commit is contained in:
parent
09b01677c0
commit
7bca90e7bf
@ -3,7 +3,12 @@
|
|||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
PSALM="$(readlink -f "$SCRIPT_DIR/../psalm")"
|
||||||
|
PSALM_PHAR="$(readlink -f "$SCRIPT_DIR/../build/psalm.phar")"
|
||||||
|
|
||||||
cd /tmp/
|
cd /tmp/
|
||||||
|
rm -Rf testing-with-real-projects
|
||||||
mkdir -p testing-with-real-projects
|
mkdir -p testing-with-real-projects
|
||||||
cd testing-with-real-projects
|
cd testing-with-real-projects
|
||||||
|
|
||||||
@ -12,15 +17,15 @@ phpunit)
|
|||||||
git clone --depth=1 git@github.com:psalm/endtoend-test-phpunit
|
git clone --depth=1 git@github.com:psalm/endtoend-test-phpunit
|
||||||
cd endtoend-test-phpunit
|
cd endtoend-test-phpunit
|
||||||
composer install
|
composer install
|
||||||
~/project/build/psalm.phar --config=.psalm/config.xml --monochrome --show-info=false
|
"$PSALM_PHAR" --config=.psalm/config.xml --monochrome --show-info=false
|
||||||
~/project/build/psalm.phar --config=.psalm/static-analysis.xml --monochrome
|
"$PSALM_PHAR" --config=.psalm/static-analysis.xml --monochrome
|
||||||
;;
|
;;
|
||||||
|
|
||||||
collections)
|
collections)
|
||||||
git clone --depth=1 git@github.com:muglug/collections.git
|
git clone --depth=1 git@github.com:muglug/collections.git
|
||||||
cd collections
|
cd collections
|
||||||
composer install
|
composer install
|
||||||
~/project/psalm --monochrome --show-info=false
|
"$PSALM" --monochrome --show-info=false
|
||||||
;;
|
;;
|
||||||
|
|
||||||
psl)
|
psl)
|
||||||
@ -28,14 +33,14 @@ psl)
|
|||||||
cd endtoend-test-psl
|
cd endtoend-test-psl
|
||||||
git checkout 1.6.x
|
git checkout 1.6.x
|
||||||
composer install --ignore-platform-reqs
|
composer install --ignore-platform-reqs
|
||||||
~/project/psalm --monochrome --config=tools/psalm/psalm.xml
|
"$PSALM" --monochrome --config=tools/psalm/psalm.xml
|
||||||
;;
|
;;
|
||||||
|
|
||||||
laravel)
|
laravel)
|
||||||
git clone --depth=1 git@github.com:muglug/framework.git
|
git clone --depth=1 git@github.com:muglug/framework.git
|
||||||
cd framework
|
cd framework
|
||||||
composer install
|
composer install
|
||||||
~/project/psalm --monochrome
|
"$PSALM" --monochrome
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: test-with-real-projects.sh {phpunit|collections|proxymanager|laravel|psl}"
|
echo "Usage: test-with-real-projects.sh {phpunit|collections|proxymanager|laravel|psl}"
|
||||||
|
Loading…
Reference in New Issue
Block a user