Skip to content

Commit

Permalink
Merge pull request #52 from chrisryan/master
Browse files Browse the repository at this point in the history
Add support for builds using Github Actions.
  • Loading branch information
chrisryan authored Sep 20, 2022
2 parents 5e9c114 + 8bbe3f0 commit 2b27091
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
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 @@ -4,6 +4,15 @@ filter:
- 'tests/*'
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
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@
},
"autoload-dev": {
"psr-4": { "TraderInteractive\\Api\\": "tests" }
},
"scripts": {
"lint": "vendor/bin/phpcs",
"test": "vendor/bin/phpunit"
}
}

0 comments on commit 2b27091

Please sign in to comment.