Skip to content

Commit 13d7a1d

Browse files
committed
Add Github Workflows build.
1 parent f705886 commit 13d7a1d

File tree

7 files changed

+81
-1
lines changed

7 files changed

+81
-1
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @traderinteractive/opensource

.github/CONTRIBUTING.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Contribution Guidelines
2+
We welcome you to report [issues](/../../issues) or submit [pull requests](/../../pulls). While the below guidelines are necessary to get code merged, you can
3+
submit pull requests that do not adhere to them and we will try to take care of them in our spare time. We are a smallish group of developers,
4+
though, so if you can make sure the build is passing 100%, that would be very useful.
5+
6+
We recommend including details of your particular usecase(s) with any issues or pull requests. We love to hear how our libraries are being used
7+
and we can get things merged in quicker when we understand its expected usage.
8+
9+
## Pull Requests
10+
Code changes should be sent through [GitHub Pull Requests](/../../pulls). Before submitting the pull request, make sure that phpunit reports success
11+
by running:
12+
```sh
13+
./vendor/bin/phpunit
14+
```
15+
And there are not coding standard violations by running
16+
```sh
17+
./vendor/bin/phpcs
18+
```
19+
20+
## Builds
21+
While the build does not strictly enforce 100% code coverage, it will not allow coverage to drop below its current percentage.
22+
[Scrutinizer](https://scrutinizer-ci.com/) is used to ensure code quality and enforce the [coding standard](http://www.php-fig.org/psr/psr-2/).
23+

.github/ISSUE_TEMPLATE.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Expected Behavior
2+
3+
## Actual Behavior
4+
5+
## Steps to reproduce the behavior
6+

.github/PULL_REQUEST_TEMPLATE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Fixes # .
2+
3+
#### What does this PR do?
4+
5+
#### Checklist
6+
- [ ] Pull request contains a clear definition of changes
7+
- [ ] Tests (either unit, integration, or acceptance) written and passing
8+
- [ ] Relevant documentation produced and/or updated
9+

.github/workflows/php.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-18.04
12+
strategy:
13+
matrix:
14+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Install PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
- name: Validate composer.json and composer.lock
23+
run: composer validate
24+
- name: Install dependencies
25+
run: composer install --prefer-dist --no-progress
26+
- name: Run PHPCS
27+
run: composer run-script lint
28+
- name: Run PHPUnit
29+
run: composer run-script test

.scrutinizer.yml

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ filter:
44
- 'docs/*'
55
before_commands:
66
- 'composer install'
7+
build:
8+
nodes:
9+
analysis:
10+
tests:
11+
override:
12+
- php-scrutinizer-run
13+
tests:
14+
override:
15+
- phpcs-run --standard=PSR2
716
tools:
817
php_analyzer: true
918
php_mess_detector: true

composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
}
2121
},
2222
"require-dev": {
23-
"squizlabs/php_codesniffer": "^3.2",
2423
"phpunit/phpunit": "^6.5",
2524
"php-coveralls/php-coveralls": "^2.1"
25+
},
26+
"scripts": {
27+
"lint": "vendor/bin/phpcs",
28+
"test": "vendor/bin/phpunit"
2629
}
2730
}

0 commit comments

Comments
 (0)