Merge pull request #27 from mobbexco/added-source-group-to-plans #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
check-syntax: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [5.6, 7.0, 7.4, 8.0, 8.2] | |
include: | |
- php: 5.6 | |
ignore-dir: tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP with tools | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer | |
- name: Install dependencies | |
run: composer install --no-dev --ignore-platform-req php | |
- name: Intall PHPCS and code standard | |
run: composer global require "phpcompatibility/php-compatibility" "squizlabs/php_codesniffer=*" | |
- name: Configure standard | |
run: ~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/phpcompatibility/php-compatibility | |
- name: Log that standards are installed | |
run: ~/.composer/vendor/bin/phpcs -i | |
- name: Execute PHPCS | |
run: ~/.composer/vendor/bin/phpcs -p . --standard=./.github/workflows/ruleset.xml --ignore=${{ matrix.ignore-dir }} | |
run-tests: | |
needs: check-syntax | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
run: composer install --dev | |
- name: Run test suite | |
run: composer run-script test |