Skip to content

test: pin the Playwright viewport to an explicit 1280x720 #554

test: pin the Playwright viewport to an explicit 1280x720

test: pin the Playwright viewport to an explicit 1280x720 #554

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
# Key the browser cache on the Playwright version alone so unrelated dependency
# bumps in the catalog do not trigger a browser reinstall.
- name: Resolve Playwright version
id: playwright-version
run: echo "version=$(grep -m1 '^playwright = ' gradle/libs.versions.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT"
- name: Setup ms-playwright cache
id: setup-ms-playwright-cache
uses: actions/cache@v6
with:
# Some dependencies are downloaded to this directory
path: /home/runner/.cache/ms-playwright
key: ms-playwright-chromium-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
- name: Install Playwright Dependencies
if: steps.setup-ms-playwright-cache.outputs.cache-hit != 'true'
# Chromium only — the only browser the tests use; one Gradle invocation.
run: ./gradlew playwright --args="install --with-deps chromium" --no-daemon
- name: build
env:
# Browsers will have been installed earlier
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: ./gradlew build --no-daemon