name: Playwright Tests on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: timeout-minutes: 60 runs-on: ubuntu-latest services: mailpit: image: 'axllent/mailpit:latest' steps: - name: "Checkout code" uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: '20.x' - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '8.2' extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv coverage: none - name: Run composer install run: composer install -n --prefer-dist - name: Create SQLite database run: touch database/database.sqlite - name: Prepare Laravel Application run: | cp .env.ci .env php artisan key:generate php artisan migrate --seed - name: Install dependencies run: npm ci - name: Build Frontend run: npm run build - name: Run Laravel Server run: php artisan serve > /dev/null 2>&1 & - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests run: npx playwright test env: PLAYWRIGHT_BASE_URL: 'http://127.0.0.1:8000' - uses: actions/upload-artifact@v3 if: always() with: name: playwright-report path: playwright-report/ retention-days: 30