Merge pull request #4 from KaririCode-Framework/develop #78
This file contains hidden or 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: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| quality: | |
| name: Quality Pipeline | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: pcov | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Initialize devkit | |
| run: vendor/bin/kcode init | |
| - name: Code style check | |
| run: vendor/bin/kcode cs:fix --check | |
| - name: Static analysis | |
| run: vendor/bin/kcode analyse | |
| - name: Tests | |
| run: vendor/bin/kcode test --coverage | |
| build-phar: | |
| name: PHAR Build Smoke Test | |
| runs-on: ubuntu-latest | |
| needs: quality | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: phar, zlib | |
| ini-values: phar.readonly=0 | |
| - name: Install humbug/box | |
| run: | | |
| wget -q -O box https://github.com/box-project/box/releases/latest/download/box.phar | |
| chmod +x box | |
| sudo mv box /usr/local/bin/box | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Compile PHAR | |
| run: php -d phar.readonly=0 box compile --config=box.json | |
| - name: Verify PHAR | |
| run: | | |
| php build/kcode.phar --version | |
| php build/kcode.phar --help | |
| php build/kcode.phar init | |
| echo "✓ PHAR smoke test passed" |