This commit is contained in:
2025-10-19 22:57:23 -05:00
parent 4d04f86067
commit 9ee0dbff1d
17 changed files with 1887 additions and 113 deletions
@@ -0,0 +1,50 @@
name: Build Playwright Runner Image
on:
push:
branches: [main]
paths:
- 'scripts/Dockerfile'
- '.github/workflows/build-playwright-image.yml'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/jobspeed-playwright-runner
jobs:
build-and-push:
name: Build and Push Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix={{branch}}-
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: scripts/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+8 -15
View File
@@ -56,29 +56,22 @@ jobs:
demo-e2e-tests:
name: Demo App E2E Tests
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/jobspeed-playwright-runner:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
run: cd job-application-demo && npx playwright install --with-deps chromium firefox
working-directory: job-application-demo
- name: Run E2E tests
run: cd job-application-demo && pnpm test:e2e
run: pnpm test:e2e
working-directory: job-application-demo
- name: Upload test results
if: failure()