Skip to content

Commit 60d12de

Browse files
authored
Merge pull request #67 from chrisryan/github-actions
Fix/Update builds
2 parents ea79f3d + ceafbfa commit 60d12de

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

.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
@@ -3,6 +3,15 @@ filter:
33
- 'vendor/*'
44
before_commands:
55
- 'composer install'
6+
build:
7+
nodes:
8+
analysis:
9+
tests:
10+
override:
11+
- php-scrutinizer-run
12+
tests:
13+
override:
14+
- phpcs-run --standard=PSR2
615
tools:
716
php_analyzer: true
817
php_mess_detector: true

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@
2929
"mongodb/mongodb": "^1.1"
3030
},
3131
"require-dev": {
32-
"php-coveralls/php-coveralls": "^2.2",
3332
"phpunit/phpunit": "^6.5.2",
3433
"squizlabs/php_codesniffer": "^3.2"
3534
},
3635
"autoload": {
3736
"psr-4": { "TraderInteractive\\Mongo\\": "src/" }
37+
},
38+
"scripts": {
39+
"lint": "vendor/bin/phpcs",
40+
"test": "vendor/bin/phpunit"
3841
}
3942
}

0 commit comments

Comments
 (0)