From 1ddfcf503d9e52a84af664a5128e00092561f16b Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 26 Jul 2023 14:32:48 -0700 Subject: [PATCH] chore: add yml for service2 test mode (#24441) --- .github/workflows/tests_service.yml | 31 +++++++++++++++++++++++++++++ tests/library/playwright.config.ts | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests_service.yml diff --git a/.github/workflows/tests_service.yml b/.github/workflows/tests_service.yml new file mode 100644 index 0000000000..44e9e83f61 --- /dev/null +++ b/.github/workflows/tests_service.yml @@ -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 }} diff --git a/tests/library/playwright.config.ts b/tests/library/playwright.config.ts index d04d6ed9f8..76f84f27c8 100644 --- a/tests/library/playwright.config.ts +++ b/tests/library/playwright.config.ts @@ -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;