release: 1.2.1 #1
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: Playwright E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - '.github/**' | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - '.github/**' | |
| permissions: | |
| contents: read | |
| actions: read | |
| checks: write | |
| pull-requests: write | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.pull_request.number) || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| if: ${{ github.event_name != 'pull_request' || github.head_ref != 'l10n_crowdin' }} | |
| timeout-minutes: 20 | |
| permissions: | |
| contents: read | |
| actions: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and export Arcane image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: false | |
| load: false | |
| tags: arcane:playwright-tests | |
| file: docker/Dockerfile | |
| build-args: BUILD_TAGS=playwright | |
| outputs: type=docker,dest=/tmp/arcane-image.tar | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Upload Docker image artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: arcane-image | |
| path: /tmp/arcane-image.tar | |
| retention-days: 1 | |
| test: | |
| if: ${{ github.event_name != 'pull_request' || github.head_ref != 'l10n_crowdin' }} | |
| permissions: | |
| contents: read | |
| actions: write | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| database: | |
| - name: sqlite | |
| compose_file: setup/compose.yaml | |
| port: 3000 | |
| - name: postgres | |
| compose_file: setup/compose-postgres.yaml | |
| port: 3001 | |
| name: E2E Tests (${{ matrix.database.name }}) | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| - name: Cache Playwright Browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-playwright- | |
| - name: Create Docker Test Resources | |
| run: | | |
| docker volume create my-app-data || true | |
| docker volume create cache || true | |
| docker network create my-test-network || true | |
| - name: Download Arcane Docker image artifact | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: arcane-image | |
| path: /tmp | |
| - name: Load Arcane Docker image | |
| run: docker load -i /tmp/arcane-image.tar | |
| - name: Pull and save test images | |
| run: | | |
| docker pull ghcr.io/linuxserver/nginx:latest | |
| docker pull ghcr.io/linuxserver/radarr:nightly | |
| docker save ghcr.io/linuxserver/nginx:latest ghcr.io/linuxserver/radarr:nightly > /tmp/test-images.tar | |
| - name: Install test dependencies | |
| run: pnpm --filter arcane-tests install | |
| - name: Install Playwright Browsers | |
| working-directory: ./tests | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: pnpm dlx playwright install --with-deps chromium | |
| - name: Run Playwright E2E tests | |
| run: pnpm --filter arcane-tests test | |
| env: | |
| COMPOSE_FILE: ${{ matrix.database.compose_file }} | |
| BASE_URL: http://localhost:${{ matrix.database.port }} | |
| - name: Upload Playwright HTML report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-${{ matrix.database.name }} | |
| path: tests/.report | |
| include-hidden-files: true | |
| retention-days: 15 |