Skip to content

Commit

Permalink
Merge pull request #2 from chrisryan/master
Browse files Browse the repository at this point in the history
Add Github Workflows build.
  • Loading branch information
chrisryan authored Sep 27, 2022
2 parents 4265117 + 94dad1d commit a340de7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PHP Composer

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHPCS
run: composer run-script lint
- name: Run PHPUnit
run: composer run-script test
9 changes: 9 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ filter:
- 'vendor/*'
before_commands:
- 'composer install'
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
tests:
override:
- phpcs-run --standard=PSR2
tools:
php_analyzer: true
php_mess_detector: true
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
}
},
"require-dev": {
"php-coveralls/php-coveralls": "^1.0",
"phpunit/phpunit": "^6.5",
"squizlabs/php_codesniffer": "^3.2"
},
"scripts": {
"lint": "vendor/bin/phpcs",
"test": "vendor/bin/phpunit"
}
}

0 comments on commit a340de7

Please # to comment.