feat(tickets): add game and achievement scoped lists for tickets2 #11908
Workflow file for this run
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: [pull_request] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-slim | |
| name: Check for changes | |
| outputs: | |
| php: ${{ steps.filter.outputs.php }} | |
| node: ${{ steps.filter.outputs.node }} | |
| openapi: ${{ steps.filter.outputs.openapi }} | |
| steps: | |
| - name: Check changed files | |
| uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| id: filter | |
| with: | |
| filters: | | |
| openapi: | |
| - 'app/**/*.php' | |
| - 'config/**' | |
| - 'routes/**' | |
| - 'composer.lock' | |
| - 'public/openapi/v2.json' | |
| php: | |
| - '**/*.php' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - 'phpstan.neon' | |
| - 'pint.json' | |
| node: | |
| - '**/*.js' | |
| - '**/*.ts' | |
| - '**/*.tsx' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - '.oxlintrc*' | |
| - '.oxfmtrc*' | |
| - 'resources/css/app.css' | |
| - 'resources/css/tailwind-v3-compat.css' | |
| - 'lang/**/*.json' | |
| node-setup: | |
| needs: changes | |
| runs-on: ubuntu-24.04 | |
| name: Node.js Setup | |
| steps: | |
| - name: Checkout code | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install pnpm | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| with: | |
| version: 10.17 | |
| - name: Use Node 24 | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: '24' | |
| php-checks: | |
| needs: changes | |
| runs-on: ubuntu-24.04 | |
| name: PHP Checks | |
| strategy: | |
| matrix: | |
| check: ['lint', 'analyse'] | |
| include: | |
| - check: lint | |
| command: composer lint | |
| - check: analyse | |
| command: composer analyse -- --memory-limit=1G | |
| env: | |
| APP_KEY: 'base64:J63qRTDLub5NuZvP+kb8YIorGS6qFYHKVo6u7179stY=' | |
| steps: | |
| - name: Skip if no PHP changes | |
| if: ${{ needs.changes.outputs.php != 'true' }} | |
| run: | | |
| echo "No PHP changes detected - skipping ${{ matrix.check }}" | |
| exit 0 | |
| - name: Checkout code | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup PHP | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: 8.4 | |
| extensions: mbstring, :psr | |
| coverage: none | |
| ini-values: memory_limit=1G | |
| - name: Install composer packages | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| run: composer install --prefer-dist | |
| - name: Restore PHPStan result cache | |
| if: ${{ needs.changes.outputs.php == 'true' && matrix.check == 'analyse' }} | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: tmp | |
| key: phpstan-result-cache-${{ github.run_id }} | |
| restore-keys: | | |
| phpstan-result-cache- | |
| - name: Run ${{ matrix.check }} | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| run: ${{ matrix.command }} | |
| env: ${{ matrix.env || fromJSON('{}') }} | |
| - name: Save PHPStan result cache | |
| if: ${{ needs.changes.outputs.php == 'true' && matrix.check == 'analyse' }} | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: tmp | |
| key: phpstan-result-cache-${{ github.run_id }} | |
| openapi-spec: | |
| needs: changes | |
| runs-on: ubuntu-24.04 | |
| name: OpenAPI Spec | |
| steps: | |
| - name: Skip if no API changes | |
| if: ${{ needs.changes.outputs.openapi != 'true' }} | |
| run: | | |
| echo "No API changes detected - skipping the OpenAPI spec check" | |
| exit 0 | |
| - name: Checkout code | |
| if: ${{ needs.changes.outputs.openapi == 'true' }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup PHP | |
| if: ${{ needs.changes.outputs.openapi == 'true' }} | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: 8.4 | |
| extensions: mbstring, :psr | |
| coverage: none | |
| ini-values: memory_limit=1G | |
| - name: Install composer packages | |
| if: ${{ needs.changes.outputs.openapi == 'true' }} | |
| run: composer install --prefer-dist --no-interaction | |
| env: | |
| COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ github.token }}"}}' | |
| - name: Check the committed spec is current | |
| if: ${{ needs.changes.outputs.openapi == 'true' }} | |
| run: php artisan ra:api:generate-openapi-spec --check | |
| env: | |
| APP_KEY: 'base64:J63qRTDLub5NuZvP+kb8YIorGS6qFYHKVo6u7179stY=' | |
| APP_URL: 'http://localhost' | |
| API_URL: 'http://localhost/api' | |
| - name: Lint the spec | |
| if: ${{ needs.changes.outputs.openapi == 'true' }} | |
| run: npx --yes @redocly/cli@2.5.0 lint public/openapi/v2.json --max-problems 50 | |
| php-tests: | |
| needs: changes | |
| runs-on: ubuntu-24.04 | |
| name: PHP Checks (test) | |
| strategy: | |
| matrix: | |
| shardIndex: [1, 2, 3, 4, 5] | |
| shardTotal: [5] | |
| steps: | |
| - name: Skip if no PHP changes | |
| if: ${{ needs.changes.outputs.php != 'true' }} | |
| run: | | |
| echo "No PHP changes detected - skipping tests (shard ${{ matrix.shardIndex }})" | |
| exit 0 | |
| - name: Checkout code | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup PHP | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: 8.4 | |
| extensions: mbstring, :psr | |
| coverage: none | |
| ini-values: memory_limit=1G | |
| - name: Install composer packages | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| run: composer install --prefer-dist | |
| - name: Generate Passport keys | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| run: php artisan passport:keys --force | |
| - name: Run tests with sharding | |
| if: ${{ needs.changes.outputs.php == 'true' }} | |
| run: ./vendor/bin/pest --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
| merge-php-test-reports: | |
| needs: [changes, php-tests] | |
| runs-on: ubuntu-slim | |
| name: Merge PHP Test Reports | |
| if: ${{ always() }} | |
| steps: | |
| - name: Check PHP test status | |
| run: | | |
| if [[ "${{ needs.changes.outputs.php }}" != "true" ]]; then | |
| echo "No PHP changes - skipping" | |
| exit 0 | |
| fi | |
| if [[ "${{ needs.php-tests.result }}" != "success" ]]; then | |
| echo "php-tests failed" | |
| exit 1 | |
| fi | |
| echo "All PHP tests passed" | |
| node-checks: | |
| needs: [changes, node-setup] | |
| runs-on: ubuntu-24.04 | |
| name: Node.js Checks | |
| strategy: | |
| matrix: | |
| check: ['tsc', 'lint', 'format'] | |
| include: | |
| - check: tsc | |
| command: pnpm tsc | |
| - check: lint | |
| command: pnpm lint | |
| - check: format | |
| command: pnpm format:check | |
| steps: | |
| - name: Skip if no Node changes | |
| if: ${{ needs.changes.outputs.node != 'true' }} | |
| run: | | |
| echo "No Node changes detected - skipping ${{ matrix.check }}" | |
| exit 0 | |
| - name: Checkout code | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install pnpm | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| with: | |
| version: 10.17 | |
| - name: Use Node 24 | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: '24' | |
| - name: Install dependencies | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Setup PHP | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: 8.4 | |
| extensions: mbstring | |
| coverage: none | |
| - name: Install composer packages | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: composer install --prefer-dist --no-progress | |
| - name: Generate Ziggy routes | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: php artisan ziggy:generate --types | |
| - name: Run ${{ matrix.check }} | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: ${{ matrix.command }} | |
| env: ${{ matrix.env || fromJSON('{}') }} | |
| node-tests: | |
| needs: [changes, node-setup] | |
| runs-on: ubuntu-24.04 | |
| name: Node.js Checks (test) | |
| strategy: | |
| matrix: | |
| shardIndex: [1, 2, 3, 4, 5, 6, 7] | |
| shardTotal: [7] | |
| steps: | |
| - name: Skip if no Node changes | |
| if: ${{ needs.changes.outputs.node != 'true' }} | |
| run: | | |
| echo "No Node changes detected - skipping tests (shard ${{ matrix.shardIndex }})" | |
| exit 0 | |
| - name: Checkout code | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install pnpm | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| with: | |
| version: 10.17 | |
| - name: Use Node 24 | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: '24' | |
| - name: Install dependencies | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Setup PHP | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: 8.4 | |
| extensions: mbstring | |
| coverage: none | |
| - name: Install composer packages | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: composer install --prefer-dist --no-progress | |
| - name: Generate Ziggy routes | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: php artisan ziggy:generate --types | |
| - name: Run tests with sharding | |
| if: ${{ needs.changes.outputs.node == 'true' }} | |
| run: pnpm test:run --coverage --coverage.thresholds=false --reporter=blob --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
| env: | |
| VITE_BUILD_PATH: dist | |
| APP_URL: https://raweb.test | |
| LARAVEL_BYPASS_ENV_CHECK: 1 | |
| - name: Upload blob report | |
| if: ${{ needs.changes.outputs.node == 'true' && !cancelled() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: blob-report-${{ matrix.shardIndex }} | |
| path: .vitest-reports/* | |
| include-hidden-files: true | |
| retention-days: 1 | |
| merge-test-reports: | |
| needs: [changes, node-tests] | |
| runs-on: ubuntu-24.04 | |
| name: Merge Node.js Test Reports | |
| # Only run if there are Node.js changes AND any of the test jobs were successful. | |
| if: ${{ needs.changes.outputs.node == 'true' && !cancelled() }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| with: | |
| version: 10.17 | |
| - name: Use Node 24 | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: '24' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Download blob reports | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| path: .vitest-reports | |
| pattern: blob-report-* | |
| merge-multiple: true | |
| - name: Merge reports | |
| run: pnpm test:run --merge-reports --coverage --coverage.reporters=text | |
| env: | |
| VITE_BUILD_PATH: dist | |
| APP_URL: https://raweb.test | |
| LARAVEL_BYPASS_ENV_CHECK: 1 |