mirror of
https://github.com/microsoft/playwright-dotnet.git
synced 2026-10-29 14:11:20 +08:00
devops: GitHub Actions workflow cleanups (#1874)
This commit is contained in:
@@ -10,14 +10,14 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.100
|
||||
dotnet-version: 5.0.x
|
||||
- name: Install dotnet-format
|
||||
run: dotnet tool install --global dotnet-format
|
||||
- name: Check formatting
|
||||
run: dotnet tool update dotnet-format --tool-path ./dotnet-format/ && ./dotnet-format/dotnet-format -f ./src/ --check -v:diag
|
||||
run: dotnet-format -f ./src/ --check -v:diag
|
||||
|
||||
@@ -18,9 +18,6 @@ jobs:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
@@ -41,11 +38,8 @@ jobs:
|
||||
- name: Build LocalNugetTest
|
||||
run: dotnet build
|
||||
working-directory: ./src/Playwright.LocalNugetTest/
|
||||
- name: Install Dependencies
|
||||
run: playwright install-deps
|
||||
working-directory: ./src/Playwright.LocalNugetTest/
|
||||
- name: Install Browsers
|
||||
run: playwright install
|
||||
- name: Install browsers and dependencies
|
||||
run: playwright install --with-deps
|
||||
working-directory: ./src/Playwright.LocalNugetTest/
|
||||
- name: Run Tests
|
||||
run: dotnet test
|
||||
|
||||
@@ -11,15 +11,12 @@ on:
|
||||
- release-*
|
||||
|
||||
jobs:
|
||||
test_net5:
|
||||
name: Quick Test Harness Tests using .NET 5
|
||||
test-net5:
|
||||
name: Test Harness Tests .NET 5
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
@@ -27,12 +24,9 @@ jobs:
|
||||
- name: Install prerequisites and download drivers
|
||||
shell: bash
|
||||
run: ./build.sh --download-driver
|
||||
- name: Building...
|
||||
- name: Building
|
||||
run: dotnet build ./src
|
||||
- name: Installing Browsers and dependencies...
|
||||
run: |
|
||||
dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install
|
||||
dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install-deps
|
||||
- name: Running tests...
|
||||
run: |
|
||||
xvfb-run dotnet test ./src/Playwright.TestingHarnessTest/Playwright.TestingHarnessTest.csproj -c Debug -f net5.0 --logger "trx"
|
||||
- name: Installing Browsers and dependencies
|
||||
run: dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install --with-deps
|
||||
- name: Running tests
|
||||
run: xvfb-run dotnet test ./src/Playwright.TestingHarnessTest/Playwright.TestingHarnessTest.csproj -c Debug -f net5.0 --logger "trx"
|
||||
|
||||
+21
-34
@@ -11,20 +11,17 @@ on:
|
||||
- release-*
|
||||
|
||||
jobs:
|
||||
test_net5:
|
||||
name: ${{ matrix.product }} on ${{ matrix.os }} using .NET 5
|
||||
test-net5:
|
||||
name: ${{ matrix.browser }}/${{ matrix.os }}/.NET 5
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
product: [CHROMIUM, FIREFOX, WEBKIT]
|
||||
browser: [chromium, firefox, webkit]
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
@@ -32,33 +29,26 @@ jobs:
|
||||
- name: Install prerequisites and download drivers
|
||||
shell: bash
|
||||
run: ./build.sh --download-driver
|
||||
- name: Building...
|
||||
- name: Building
|
||||
run: dotnet build ./src
|
||||
- name: Installing Browsers and dependencies...
|
||||
run: |
|
||||
dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install
|
||||
dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install-deps
|
||||
- name: Running tests...
|
||||
if: ${{ matrix.os != 'ubuntu-latest' }}
|
||||
- name: Installing Browsers and dependencies
|
||||
run: dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install --with-deps ${{ matrix.browser }}
|
||||
- name: Running tests
|
||||
if: matrix.os != 'ubuntu-latest'
|
||||
env:
|
||||
BROWSER: ${{ matrix.product }}
|
||||
run:
|
||||
dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug -f net5.0 --logger "trx;LogFileName=TestResults.xml" -- NUnit.NumberOfTestWorkers=1
|
||||
- name: Running tests... (Linux)
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
BROWSER: ${{ matrix.browser }}
|
||||
run: dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug -f net5.0 --logger "trx;LogFileName=TestResults.xml" -- NUnit.NumberOfTestWorkers=1
|
||||
- name: Running tests (Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
env:
|
||||
BROWSER: ${{ matrix.product }}
|
||||
run: |
|
||||
xvfb-run dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug -f net5.0 --logger "trx" -- NUnit.NumberOfTestWorkers=1
|
||||
BROWSER: ${{ matrix.browser }}
|
||||
run: xvfb-run dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug -f net5.0 --logger "trx" -- NUnit.NumberOfTestWorkers=1
|
||||
|
||||
test_net31:
|
||||
name: Chromium on Ubuntu using .NET 3.1
|
||||
test-net31:
|
||||
name: chromium/ubuntu/.NET 3.1
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
- name: Setup .NET Core 3.1
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
@@ -70,16 +60,13 @@ jobs:
|
||||
- name: Install prerequisites and download drivers
|
||||
shell: bash
|
||||
run: ./build.sh --download-driver
|
||||
- name: Building...
|
||||
- name: Building
|
||||
run: |
|
||||
dotnet build -f netstandard2.0 ./src/Playwright/Playwright.csproj
|
||||
dotnet build -f netcoreapp3.1 ./src/Playwright.Tests/Playwright.Tests.csproj
|
||||
- name: Installing Browsers and dependencies...
|
||||
run: |
|
||||
dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install
|
||||
dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install-deps
|
||||
- name: Running tests...
|
||||
- name: Installing Browsers and dependencies
|
||||
run: dotnet run --project ./src/Playwright/Playwright.csproj -f net5.0 -- install --with-deps chromium
|
||||
- name: Running tests
|
||||
env:
|
||||
BROWSER: CHROMIUM
|
||||
run: |
|
||||
xvfb-run dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug -f netcoreapp3.1 --logger "trx" -- NUnit.NumberOfTestWorkers=1
|
||||
run: xvfb-run dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug -f netcoreapp3.1 --logger "trx" -- NUnit.NumberOfTestWorkers=1
|
||||
|
||||
Reference in New Issue
Block a user