-
Notifications
You must be signed in to change notification settings - Fork 857
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add justfile, remove coveralls, and fix AUTOLOAD in CI (#1801)
* add justfile and tweak CI + readme * debug test * Debugging * further debugging * restore original composer json * add more logging * maybe fix ci * Fix typo * fix test naming and pass autoload directly to recipe as arugment * Remove unused logline and fix typo * restore composer * remove extra log line * update justfile * add comments * update ci * revert to gh action
- Loading branch information
1 parent
d89ed48
commit e2b61e0
Showing
7 changed files
with
87 additions
and
37 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
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
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,63 @@ | ||
import? '../sdk-codegen/justfile' | ||
|
||
set quiet | ||
|
||
# make vendored executables callable directly | ||
export PATH := "vendor/bin:" + env_var('PATH') | ||
|
||
_default: | ||
just --list --unsorted | ||
|
||
# install vendored dependencies; only used locally | ||
install: | ||
composer install | ||
|
||
# ⭐ run full unit test suite; needs stripe-mock | ||
[no-exit-message] | ||
test *args: | ||
phpunit {{ args }} | ||
|
||
# run tests in CI; can use autoload mode (or not) | ||
[confirm("This will modify local files and is intended for use in CI; do you want to proceed?")] | ||
ci-test autoload: | ||
./build.php {{ autoload }} | ||
|
||
# ⭐ format all files | ||
format *args: | ||
PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix -v --using-cache=no {{ args }} | ||
|
||
# for backwards compatibility; ideally removed later | ||
[private] | ||
alias codegen-format := format | ||
|
||
# check formatting for, but don't modify, files | ||
format-check: (format "--dry-run") | ||
|
||
# ⭐ statically analyze code | ||
lint *args: | ||
php -d memory_limit=512M vendor/bin/phpstan analyse lib tests {{args}} | ||
|
||
# for backwards compatibility; ideally removed later | ||
[private] | ||
alias phpstan := lint | ||
|
||
# called by tooling | ||
[private] | ||
update-version version: | ||
echo "{{ version }}" > VERSION | ||
perl -pi -e 's|VERSION = '\''[.\-\w\d]+'\''|VERSION = '\''{{ version }}'\''|' lib/Stripe.php | ||
|
||
|
||
PHPDOCUMENTOR_VERSION := "v3.0.0" | ||
# generates docs; currently broken? can unhide if working | ||
[private] | ||
phpdoc: | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
if [ ! -f vendor/bin/phpdoc ]; then | ||
curl -sfL https://github.com/phpDocumentor/phpDocumentor/releases/download/{{ PHPDOCUMENTOR_VERSION }}/phpDocumentor.phar -o vendor/bin/phpdoc | ||
chmod +x vendor/bin/phpdoc | ||
fi | ||
|
||
phpdoc |
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