Skip to content

Initial Commit: Clean Playwright .NET Automation Framework with CI/CD… #18

Initial Commit: Clean Playwright .NET Automation Framework with CI/CD…

Initial Commit: Clean Playwright .NET Automation Framework with CI/CD… #18

name: Playwright Tests (.NET)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build project
run: dotnet build --configuration Release --no-restore
- name: Install Playwright .NET CLI tool
run: dotnet tool install --global Microsoft.Playwright.CLI
- name: Install Playwright browsers
run: playwright install --with-deps
- name: Run Playwright Tests
run: dotnet test --configuration Release --logger "trx;LogFileName=test_results.trx"
- name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: playwright-test-results
path: TestResults/