Merge pull request #1 from KaririCode-Framework/develop #2
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: Kariri CI Pipeline | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
setup-and-lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ["8.3"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Set up PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, xml | |
tools: composer:v2, php-cs-fixer, phpunit | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Validate composer.json | |
run: composer validate | |
- name: Coding Standards Check | |
run: vendor/bin/php-cs-fixer fix --dry-run --diff | |
unit-tests: | |
needs: setup-and-lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download Composer Cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Set up PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, xml | |
tools: composer:v2, php-cs-fixer, phpunit | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Run PHPUnit Tests | |
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text | |
- name: Security Check | |
run: vendor/bin/security-checker security:check |