Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/ci.yaml → .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI"
name: "Tests"

on:
push:
Expand All @@ -10,9 +10,9 @@ on:
jobs:
tests:
runs-on: "ubuntu-latest"
name: "Test PHP${{ matrix.php }}"
name: "Test PHP ${{ matrix.php }}"
strategy:
fail-fast: true
fail-fast: false
matrix:
php:
- "7.2"
Expand All @@ -31,16 +31,19 @@ jobs:
php-version: "${{ matrix.php }}"
tools: "composer"

- name: "Configure Composer bin directory"
run: "composer global config repositories.bin path $PWD"

- name: "Install Composer bin plugin"
run: "composer global require bamarni/composer-bin-plugin:dev-master"
- name: "Configure global composer"
run: |
composer global config repositories.bin path $PWD
composer global config allow-plugins.bamarni/composer-bin-plugin true
composer global require bamarni/composer-bin-plugin:dev-${GITHUB_SHA}

- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"

- name: "Validate composer.json"
run: "composer validate --strict --no-check-lock"

- name: "Run tests"
run: "vendor/bin/phpunit"
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
1. [Forward mode](#forward-mode)
1. [Reduce clutter](#reduce-clutter)
1. [Related plugins](#related-plugins)
1. [Contributing](#contributing)


## Why?
Expand Down Expand Up @@ -229,6 +230,17 @@ vendor-bin/**/composer.lock binary
* [theofidry/composer-inheritance-plugin][7]: Opinionated version of [Wikimedia composer-merge-plugin][8] to work in pair with this plugin.


## Contributing

Before getting started, you need to install the plugin globally:

```bash
$ composer global require --dev bamarni/composer-bin-plugin
$ composer install # now works
$ vendor/bin/phpunit # run the tests
```


[1]: https://github.com/etsy/phan
[2]: https://github.com/phpmetrics/PhpMetrics
[3]: https://getcomposer.org/doc/06-config.md#bin-dir
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
},
"require-dev": {
"composer/composer": "^1.0 || ^2.0",
"phpstan/extension-installer": "^1.1",
"symfony/console": "^2.5 || ^3.0 || ^4.0"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"extra": {
"class": "Bamarni\\Composer\\Bin\\Plugin"
Expand Down