From f00c0b202fe7c747206e13c30935febae02e246d Mon Sep 17 00:00:00 2001 From: Christopher Ryan Date: Tue, 20 Sep 2022 10:43:04 -0400 Subject: [PATCH] Add Github Worflows build config. --- .github/workflows/php.yml | 29 +++++++++++++++++++++++++++++ .scrutinizer.yml | 9 +++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..685188c --- /dev/null +++ b/.github/workflows/php.yml @@ -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 diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 0af7b4b..cf3ca48 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -3,6 +3,15 @@ filter: - 'vendor/*' before_commands: - 'composer install --prefer-source' +build: + nodes: + analysis: + tests: + override: + - php-scrutinizer-run + tests: + override: + - phpcs-run --standard=PSR2 tools: php_analyzer: true php_mess_detector: true