-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move validation test suite, phpstan to GitHub Workflows
- Perform a shallow clone of submodules analyzed in validation test suite in GitHub workflows (should take around 30 seconds) - Switch badge in README.md to GitHub Workflows and update default branch for badge. - Remove travis config - After #385 is merged run_phpstan.sh can remove the separate install step (as a followup PR) - Require a newer phpunit patch version in devDependencies Make it harder for contributors to have any inconsistencies with CI when running tests (e.g. php version support, fixed phpunit bugs, etc)
- Loading branch information
1 parent
3eccfd2
commit 89f263b
Showing
9 changed files
with
46 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ tests/output | |
**/.*.swp | ||
**/.*.swo | ||
**/Dockerfile | ||
ci/*_dockerized.sh | ||
.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
# -x Exit immediately if any command fails | ||
# -e Echo all commands being executed. | ||
# -u Fail for undefined variables | ||
set -xeu | ||
# This installs and runs phpstan | ||
# TODO: Remove separate phpstan install step after https://github.com/microsoft/tolerant-php-parser/pull/385 is merged | ||
if [ ! -d vendor/phpstan/phpstan ]; then | ||
composer.phar require --dev phpstan/phpstan=^1.8 | ||
fi | ||
./vendor/bin/phpstan analyze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
if [ $# != 1 ]; then | ||
echo "Usage: $0 PHP_VERSION" 1>&2 | ||
echo "e.g. $0 8.0" 1>&2 | ||
echo "The PHP_VERSION is the version of the php docker image to use to run phpstan (static analysis)" 1>&2 | ||
exit 1 | ||
fi | ||
# -x Exit immediately if any command fails | ||
# -e Echo all commands being executed. | ||
# -u fail for undefined variables | ||
set -xeu | ||
PHP_VERSION=$1 | ||
|
||
# This is the same image name, Dockerfile and build arguments as ci/run_tests_dockerized.sh | ||
DOCKER_IMAGE="tolerant-php-parser-test-runner:$PHP_VERSION" | ||
docker build --build-arg="PHP_VERSION=$PHP_VERSION" --tag="$DOCKER_IMAGE" -f ci/Dockerfile . | ||
docker run --rm $DOCKER_IMAGE ci/run_phpstan.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters