ci: add Dependabot (composer, github-actions, W3C submodule) #4
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@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: hash, mbstring | |
| 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@v4 | |
| 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 + parity lock) | |
| run: composer test | |
| conformance: | |
| name: W3C Conformance | |
| runs-on: ubuntu-latest | |
| # Full conformance (86/86) — this job gates: the rdf-canon suite must pass. | |
| steps: | |
| - name: Checkout (with W3C submodule) | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: hash, mbstring | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: Run W3C RDFC-1.0 test suite | |
| run: composer test:w3c |