1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
psalm/bin/test-with-real-projects.sh
Daniil Gentili cca276768e
List refactoring v5 (#8820)
* Squash

* Remove BC break

* Suppress

* Possibly fix

* Fixes

* Fix test

* Trigger build

* Update psl

* Update psl

* Fixes

* Fixes

* Cleanup

* fix

* Fix build

* Do not consider never when getting the max count

* Add assertion

* Cleanup

* Fix

* Cleanup
2022-12-13 21:40:19 +01:00

56 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
set -x
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(realpath "$SCRIPT_DIR")"
PSALM="$(readlink -f "$SCRIPT_DIR/../psalm")"
PSALM_PHAR="$(readlink -f "$SCRIPT_DIR/../build/psalm.phar")"
cd /tmp/
rm -Rf testing-with-real-projects
mkdir -p testing-with-real-projects
cd testing-with-real-projects
case $1 in
phpunit)
git clone --depth=1 git@github.com:psalm/endtoend-test-phpunit
cd endtoend-test-phpunit
composer install
"$PSALM_PHAR" --config=.psalm/config.xml --monochrome --show-info=false
"$PSALM_PHAR" --config=.psalm/static-analysis.xml --monochrome
;;
collections)
git clone --depth=1 git@github.com:psalm/endtoend-test-collections.git
cd endtoend-test-collections
composer install
"$PSALM" --monochrome --show-info=false
;;
psl)
# For circleCI
export PHP_EXTENSION_INTL=1
export PHP_EXTENSION_BCMATH=1
git clone git@github.com:psalm/endtoend-test-psl.git
cd endtoend-test-psl
git checkout 2.3.x
composer install
"$PSALM" --monochrome -c config/psalm.xml
"$PSALM" --monochrome -c config/psalm.xml tests/static-analysis
;;
laravel)
git clone --depth=1 git@github.com:psalm/endtoend-test-laravel.git
cd endtoend-test-laravel
composer install
"$PSALM" --monochrome
;;
*)
echo "Usage: test-with-real-projects.sh {phpunit|collections|laravel|psl}"
exit 1
esac