Skip to content

Commit 2b27091

Browse files
authored
Merge pull request #52 from chrisryan/master
Add support for builds using Github Actions.
2 parents 5e9c114 + 8bbe3f0 commit 2b27091

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/php.yml

Lines changed: 29 additions & 0 deletions
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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ filter:
44
- 'tests/*'
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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@
5050
},
5151
"autoload-dev": {
5252
"psr-4": { "TraderInteractive\\Api\\": "tests" }
53+
},
54+
"scripts": {
55+
"lint": "vendor/bin/phpcs",
56+
"test": "vendor/bin/phpunit"
5357
}
5458
}

0 commit comments

Comments
 (0)