Merge pull request #1 from Accredifysg/dependabot/github_actions/acti… #19
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Unit · PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.2', '8.3', '8.4'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php-${{ matrix.php }}-composer- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: Run Pint (code style) | |
| run: vendor/bin/pint --test | |
| - name: Run PHPStan (static analysis) | |
| run: vendor/bin/phpstan analyse --no-progress | |
| - name: Run Pest (unit tests) | |
| run: composer test | |
| conformance: | |
| name: W3C Conformance | |
| runs-on: ubuntu-latest | |
| # Gating. The 14 known blockers (7 expand, 7 toRdf) are an explicit | |
| # expected-failure allowlist in tests/W3c/KnownBlockers.php, so the suite | |
| # exits 0. Any NEW conformance regression — or a listed blocker that starts | |
| # passing — fails this job. | |
| steps: | |
| - name: Checkout (with W3C submodule) | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: Run W3C JSON-LD 1.1 test suite | |
| run: composer test:w3c |