Chore: Remove license badge from README.md #12
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| tools: composer:v2 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: php-8.3-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: php-8.3-composer- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Check code style | |
| run: composer pint-test | |
| analyse: | |
| name: Static Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| tools: composer:v2 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: php-8.3-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: php-8.3-composer- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run PHPStan | |
| run: composer analyse | |
| continue-on-error: true | |
| test: | |
| name: Test (PHP ${{ matrix.php-version }}) | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: ["8.2", "8.3", "8.4"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP ${{ matrix.php-version }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: php-${{ matrix.php-version }}-composer- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run tests | |
| run: composer test | |
| ci-success: | |
| name: CI Success | |
| runs-on: ubuntu-latest | |
| needs: [lint, analyse, test] | |
| if: always() | |
| steps: | |
| - name: Check all jobs | |
| run: | | |
| echo "===== Job Results =====" | |
| echo "Lint: ${{ needs.lint.result }}" | |
| echo "Analyse: ${{ needs.analyse.result }}" | |
| echo "Test: ${{ needs.test.result }}" | |
| echo "=======================" | |
| if [ "${{ needs.lint.result }}" != "success" ]; then | |
| echo "❌ Lint failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "❌ Tests failed" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.analyse.result }}" == "failure" ]; then | |
| echo "⚠️ Static analysis failed (non-blocking)" | |
| fi | |
| echo "✅ All required checks passed!" |