Skip to content

overpod/playwright-bun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

playwright-bun

GitHub Container Registry License: MIT

Docker image with Playwright and Bun runtime for E2E testing.

Features

  • Playwright 1.57.0 with all browsers pre-installed
  • Bun runtime (latest version)
  • Browsers included:
    • Chromium
    • Firefox
    • WebKit
    • Google Chrome

Quick Start

docker pull ghcr.io/mosadif/playwright-bun:latest

Usage

Run Tests

docker run --rm -v $(pwd):/app ghcr.io/mosadif/playwright-bun:latest \
  bash -c "bun install && bunx playwright test"

Run Tests in Specific Browser

# Chromium
docker run --rm -v $(pwd):/app ghcr.io/mosadif/playwright-bun:latest \
  bash -c "bun install && bunx playwright test --project=chromium"

# Firefox
docker run --rm -v $(pwd):/app ghcr.io/mosadif/playwright-bun:latest \
  bash -c "bun install && bunx playwright test --project=firefox"

# WebKit
docker run --rm -v $(pwd):/app ghcr.io/mosadif/playwright-bun:latest \
  bash -c "bun install && bunx playwright test --project=webkit"

Interactive Mode

docker run --rm -it -v $(pwd):/app ghcr.io/mosadif/playwright-bun:latest bash

With Environment Variables

docker run --rm -v $(pwd):/app --env-file .env ghcr.io/mosadif/playwright-bun:latest \
  bash -c "bun install && bunx playwright test"

Save Reports

docker run --rm \
  -v $(pwd):/app \
  -v $(pwd)/playwright-report:/app/playwright-report \
  -v $(pwd)/test-results:/app/test-results \
  ghcr.io/mosadif/playwright-bun:latest \
  bash -c "bun install && bunx playwright test"

Tags

When a new git tag is pushed (e.g., v1.57.0), the following Docker tags are automatically created:

Tag Description Example
latest Latest stable version ghcr.io/mosadif/playwright-bun:latest
<version> Full semantic version ghcr.io/mosadif/playwright-bun:1.57.0
<major>.<minor> Major.minor version ghcr.io/mosadif/playwright-bun:1.57

Building Locally

docker build -t playwright-bun .

Publishing

This image is automatically built and published to GitHub Container Registry when a new tag is created:

git tag v1.57.0
git push origin v1.57.0

The GitHub Actions workflow will:

  1. Build the Docker image
  2. Push to ghcr.io/mosadif/playwright-bun with tags:
    • 1.57.0 (full version)
    • 1.57 (major.minor)
    • latest

License

MIT License - see LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors