chore: remove planning and refactor artifacts (now tracked as GitHub … #5
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
| # CI for php-sdk. | |
| # | |
| # Action pinning policy: | |
| # - First-party actions (actions/*) are pinned to a major tag (e.g. @v4). | |
| # - Third-party actions are pinned to a full commit SHA, with the released | |
| # version recorded in a trailing comment for human review. | |
| name: test | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - '.editorconfig' | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - '.editorconfig' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.4'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup PHP ${{ matrix.php }} | |
| uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: pdo, pdo_sqlite, mbstring, json | |
| coverage: pcov | |
| 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.lock', '**/composer.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php-${{ matrix.php }}-composer- | |
| - name: Install dependencies | |
| run: composer install --no-progress --no-interaction --prefer-dist | |
| - name: Lint (php-cs-fixer dry-run) | |
| if: hashFiles('.php-cs-fixer.dist.php', '.php-cs-fixer.php') != '' | |
| run: vendor/bin/php-cs-fixer fix --dry-run --diff | |
| - name: Run PHPUnit | |
| run: vendor/bin/phpunit | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-artifacts-php-${{ matrix.php }} | |
| path: | | |
| .phpunit.cache/ | |
| build/ | |
| coverage.xml | |
| if-no-files-found: ignore | |
| retention-days: 7 |