mirror of
https://github.com/microsoft/playwright-dotnet.git
synced 2026-10-25 02:31:04 +08:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
name: Test Docker
|
|
on:
|
|
push:
|
|
paths:
|
|
- '.github/workflows/test_docker.yml'
|
|
- 'src/Common/Version.props'
|
|
- '**/*.csproj'
|
|
- '**/*Dockerfile.*'
|
|
branches:
|
|
- main
|
|
- release-*
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/test_docker.yml'
|
|
- '**/*Dockerfile.*'
|
|
branches:
|
|
- main
|
|
- release-*
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 60
|
|
runs-on: ${{ matrix.runs-on }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
flavor: [jammy, noble]
|
|
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Setup .NET Core
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
- name: Install prerequisites and download drivers
|
|
shell: bash
|
|
run: ./build.sh --download-driver
|
|
- name: Build Docker image
|
|
run: |
|
|
ARCH="${{ matrix.runs-on == 'ubuntu-24.04-arm' && 'arm64' || 'amd64' }}"
|
|
bash utils/docker/build.sh --$ARCH ${{ matrix.flavor }} playwright-dotnet:localbuild-${{ matrix.flavor }}
|
|
- name: Cleanup
|
|
run: dotnet clean src/ || true
|
|
- name: Test
|
|
run: |
|
|
CONTAINER_ID="$(docker run --rm -e CI --ipc=host -v $(pwd):/root/playwright --name playwright-docker-test --workdir /root/playwright/ -e CI -d -t playwright-dotnet:localbuild-${{ matrix.flavor }} /bin/bash)"
|
|
docker exec -e BROWSER=chromium "${CONTAINER_ID}" xvfb-run dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug --logger:"console;verbosity=detailed"
|
|
docker exec -e BROWSER=firefox "${CONTAINER_ID}" xvfb-run dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug --logger:"console;verbosity=detailed"
|
|
docker exec -e BROWSER=webkit "${CONTAINER_ID}" xvfb-run dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug --logger:"console;verbosity=detailed"
|