The last of the audit list: the type scale wins, the card headings get names, and the reveals reach the keyboard #23
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: tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| # Read-only. This repository accepts pull requests from forks, so no workflow | |
| # here may be granted write access to the repository or to secrets. | |
| permissions: | |
| contents: read | |
| jobs: | |
| php: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: ["8.4", "8.5"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Copy environment file | |
| run: cp .env.example .env | |
| - name: Generate application key | |
| run: php artisan key:generate | |
| - name: Tests | |
| run: ./vendor/bin/pest | |
| frontend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Build | |
| run: npm run build | |
| # HomepageRenderTest is the only test that needs a built SSR bundle and a | |
| # running SSR service, and it skips itself when either is missing. The `php` | |
| # job above provides neither, so every assertion in that file silently | |
| # skipped on every run. This job is the one place it actually executes; | |
| # REQUIRE_SSR turns those skips into failures so it cannot go quiet again. | |
| ssr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.4" | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install PHP dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Copy environment file | |
| run: cp .env.example .env | |
| - name: Generate application key | |
| run: php artisan key:generate | |
| - name: Build client and SSR bundles | |
| run: npm run build | |
| # The port is read from .env rather than repeated here: .env.example | |
| # already carries INERTIA_SSR_URL and INERTIA_SSR_PORT, and its own | |
| # comment requires the two to agree. A third copy would be a third thing | |
| # to keep in sync. | |
| - name: Start the SSR service | |
| run: | | |
| port="$(grep '^INERTIA_SSR_PORT=' .env | cut -d= -f2)" | |
| nohup php artisan inertia:start-ssr > /tmp/ssr.log 2>&1 & | |
| for _ in $(seq 1 30); do | |
| if (exec 3<>"/dev/tcp/127.0.0.1/${port}") 2>/dev/null; then | |
| exec 3<&- | |
| echo "SSR service listening on ${port}" | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "SSR service did not open port ${port} within 30s" >&2 | |
| cat /tmp/ssr.log >&2 || true | |
| exit 1 | |
| - name: SSR render tests | |
| env: | |
| REQUIRE_SSR: 1 | |
| run: ./vendor/bin/pest tests/Feature/Landing/HomepageRenderTest.php | |
| - name: SSR service log | |
| if: always() | |
| run: cat /tmp/ssr.log || true |