-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Switch to GitHub Actions
- Loading branch information
1 parent
f5ec1e8
commit bc8901d
Showing
7 changed files
with
135 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.json] | ||
indent_size = 4 | ||
|
||
[*.{yaml,yml}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
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,9 @@ | ||
/.github/ export-ignore | ||
/tests/ export-ignore | ||
/.codeclimate.yml export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.php_cs export-ignore | ||
/infection.json export-ignore | ||
/Makefile export-ignore | ||
/phpunit.xml.dist export-ignore |
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,39 @@ | ||
# CONTRIBUTING | ||
|
||
We are using [GitHub Actions](https://github.com/features/actions) as a continuous integration system. | ||
|
||
For details, take a look at the following workflow configuration files: | ||
|
||
- [`workflows/integrate.yaml`](workflows/integrate.yaml) | ||
|
||
## Tests | ||
|
||
We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) to drive the development. | ||
|
||
Run | ||
|
||
```sh | ||
$ make tests | ||
``` | ||
|
||
to run all the tests. | ||
|
||
## Extra lazy? | ||
|
||
Run | ||
|
||
```sh | ||
$ make | ||
``` | ||
|
||
to run tests! | ||
|
||
## Help | ||
|
||
:bulb: Run | ||
|
||
```sh | ||
$ make help | ||
``` | ||
|
||
to display a list of available targets with corresponding descriptions. |
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,54 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
name: "Integrate" | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: null | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
tests: | ||
name: "Tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "5.4" | ||
- "5.5" | ||
- "5.6" | ||
- "7.0" | ||
|
||
dependencies: | ||
- "locked" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Determine composer cache directory" | ||
id: "determine-composer-cache-directory" | ||
run: "echo \"::set-output name=directory::$(composer config cache-dir)\"" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}" | ||
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install locked dependencies from composer.lock" | ||
if: "matrix.dependencies == 'locked'" | ||
run: "composer install --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Run tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=phpunit.xml.dist" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.PHONY: it | ||
it: tests ## Runs the tests target | ||
|
||
.PHONY: help | ||
help: ## Displays this list of targets with descriptions | ||
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
.PHONY: tests | ||
tests: vendor ## Runs tests with phpunit/phpunit | ||
vendor/bin/phpunit --configuration=phpunit.xml.dist | ||
|
||
vendor: composer.json composer.lock | ||
composer validate --strict | ||
composer install --no-interaction --no-progress --no-suggest |
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