chore: add yml for service2 test mode (#24441)

This commit is contained in:
Pavel Feldman 2023-07-26 14:32:48 -07:00 committed by GitHub
parent 4949cef09c
commit 1ddfcf503d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 1 deletions

31
.github/workflows/tests_service.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: "tests service"
on:
workflow_dispatch:
env:
FORCE_COLOR: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
jobs:
transport_linux:
name: "Service"
strategy:
fail-fast: false
matrix:
os: [linux]
browser: [chromium]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npm run build
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }} --workers=20
env:
PWTEST_MODE: service2
PLAYWRIGHT_SERVICE_ACCESS_KEY: ${{ secrets.PLAYWRIGHT_SERVICE_ACCESS_KEY }}
PLAYWRIGHT_SERVICE_URL: ${{ secrets.PLAYWRIGHT_SERVICE_URL }}
PLAYWRIGHT_SERVICE_OS: ${{ matrix.os }}

View File

@ -53,7 +53,7 @@ const reporters = () => {
return result;
};
const os: 'linux' | 'windows' = 'linux'; // use linux
const os: 'linux' | 'windows' = (process.env.PLAYWRIGHT_SERVICE_OS as 'linux' | 'windows') || 'linux';
const runId = new Date().toISOString(); // name the test run
let connectOptions: any;