diff --git a/.github/actions/setup-laravel/action.yml b/.github/actions/setup-laravel/action.yml index c40a2d07..fb27885c 100644 --- a/.github/actions/setup-laravel/action.yml +++ b/.github/actions/setup-laravel/action.yml @@ -24,13 +24,13 @@ runs: - name: Setup Node.js if: inputs.node == 'true' - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: '22' cache: 'npm' - name: Cache Composer dependencies - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: vendor key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 09d1c471..c55a1127 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: quality: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4a655c4b..4c55e6c5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,7 +47,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Setup test environment uses: ./.github/actions/setup-laravel @@ -64,6 +64,11 @@ jobs: e2e: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + shard: [1, 2] + services: postgres: image: postgres:16 @@ -91,7 +96,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Setup test environment uses: ./.github/actions/setup-laravel @@ -101,6 +106,7 @@ jobs: redis-port: ${{ job.services.redis.ports['6379'] }} - name: Run frontend unit tests + if: matrix.shard == 1 run: npm run test:unit - name: Build assets @@ -113,13 +119,21 @@ jobs: env: DB_PORT: ${{ job.services.postgres.ports['5432'] }} REDIS_PORT: ${{ job.services.redis.ports['6379'] }} - run: php artisan test tests/Browser --compact + run: php artisan test tests/Browser --compact --shard=${{ matrix.shard }}/2 - name: Upload Playwright artifacts if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: - name: playwright-artifacts + name: playwright-artifacts-${{ matrix.shard }} path: tests/Browser/Screenshots if-no-files-found: ignore retention-days: 7 + + e2e-gate: + if: always() + needs: e2e + runs-on: ubuntu-latest + steps: + - name: Require all e2e shards to pass + run: '[ "${{ needs.e2e.result }}" = "success" ] || exit 1'