Bump CI actions to Node 24 and shard the e2e job

Move actions/checkout, setup-node, cache, and upload-artifact to their current majors (Node 24 runtime). Run the browser suite as a sharded matrix aggregated by an e2e-gate job, so the required status check stays a stable name as the shard count scales. Vitest runs once (shard 1). Ready for the incoming e2e test expansion.
This commit is contained in:
Paulo Castellano 2026-07-04 10:28:17 -03:00
parent 2d72d74cc8
commit 45d0dbf510
3 changed files with 22 additions and 8 deletions

View file

@ -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') }}

View file

@ -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

View file

@ -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'