<p dir="auto">I am trying to run my tests on github actions . My config file is within the tests/playwright folder in the repo.When I run the workflow , the action uses just one worker as opposed to 90% specified in the playwright.config.ts file. If I change the worker index to a number say 10, it uses the given number of workers to execute the tests.</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.35]</li>
<li>Operating System: [Ubuntu 20]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="workflow:
name: &quot;Tests Example&quot;
on:
    schedule:
        - cron:  '0 6 * * 1'
    workflow_dispatch:
jobs:
    Playwright:
        runs-on: ubuntu-latest
        timeout-minutes: 60
        steps:
            -   name: Checkout repo
                uses: actions/checkout@v3
            -   name: Setup node
                uses: actions/setup-node@v3
            -   name: Install dependencies
                working-directory: tests/playwright
                run: 
                    npm ci
            -   name: Install Other dependencies
                run: npx playwright install-deps 
            -   name: Install Browsers
                working-directory: tests/playwright
                run:  npx playwright install 
            -   name: Run Playwright tests
                working-directory: tests/playwright
                run: npx playwright tests
            -   name: Upload test results
                if: always()
                uses: actions/upload-artifact@v3
                with:
                  name: playwright-results
                  path: tests/playwright/playwright-report
"><pre class="notranslate"><span class="pl-ent">workflow</span>:
<span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>Tests Example<span class="pl-pds">"</span></span>
<span class="pl-ent">on</span>:
    <span class="pl-ent">schedule</span>:
        - <span class="pl-ent">cron</span>:  <span class="pl-s"><span class="pl-pds">'</span>0 6 * * 1<span class="pl-pds">'</span></span>
    <span class="pl-ent">workflow_dispatch</span>:
<span class="pl-ent">jobs</span>:
    <span class="pl-ent">Playwright</span>:
        <span class="pl-ent">runs-on</span>: <span class="pl-s">ubuntu-latest</span>
        <span class="pl-ent">timeout-minutes</span>: <span class="pl-c1">60</span>
        <span class="pl-ent">steps</span>:
            -   <span class="pl-ent">name</span>: <span class="pl-s">Checkout repo</span>
                <span class="pl-ent">uses</span>: <span class="pl-s">actions/checkout@v3</span>
            -   <span class="pl-ent">name</span>: <span class="pl-s">Setup node</span>
                <span class="pl-ent">uses</span>: <span class="pl-s">actions/setup-node@v3</span>
            -   <span class="pl-ent">name</span>: <span class="pl-s">Install dependencies</span>
                <span class="pl-ent">working-directory</span>: <span class="pl-s">tests/playwright</span>
                <span class="pl-ent">run</span>: 
                    <span class="pl-s">npm ci</span>
            -   <span class="pl-ent">name</span>: <span class="pl-s">Install Other dependencies</span>
                <span class="pl-ent">run</span>: <span class="pl-s">npx playwright install-deps </span>
            -   <span class="pl-ent">name</span>: <span class="pl-s">Install Browsers</span>
                <span class="pl-ent">working-directory</span>: <span class="pl-s">tests/playwright</span>
                <span class="pl-ent">run</span>:  <span class="pl-s">npx playwright install </span>
            -   <span class="pl-ent">name</span>: <span class="pl-s">Run Playwright tests</span>
                <span class="pl-ent">working-directory</span>: <span class="pl-s">tests/playwright</span>
                <span class="pl-ent">run</span>: <span class="pl-s">npx playwright tests</span>
            -   <span class="pl-ent">name</span>: <span class="pl-s">Upload test results</span>
                <span class="pl-ent">if</span>: <span class="pl-s">always()</span>
                <span class="pl-ent">uses</span>: <span class="pl-s">actions/upload-artifact@v3</span>
                <span class="pl-ent">with</span>:
                  <span class="pl-ent">name</span>: <span class="pl-s">playwright-results</span>
                  <span class="pl-ent">path</span>: <span class="pl-s">tests/playwright/playwright-report</span>
</pre></div>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { PlaywrightTestConfig, devices } from &quot;@playwright/test&quot;;

const config: PlaywrightTestConfig = {
  fullyParallel: true,
  projects: [
    {
      name: &quot;Chrome&quot;,
      use: {
        headless: true,
        browserName: &quot;chromium&quot;,
        ignoreHTTPSErrors: true,
        screenshot: {
          mode: &quot;only-on-failure&quot;,
          fullPage: true,
        },
        video: &quot;retain-on-failure&quot;,
      },
      retries: 1,
    },
    {
      name: &quot;Firefox&quot;,
      use: {
        headless: true,
        browserName: &quot;firefox&quot;,
        ignoreHTTPSErrors: true,
        screenshot: {
          mode: &quot;only-on-failure&quot;,
          fullPage: true,
        },
        video: &quot;retain-on-failure&quot;,
      },
      retries: 1,
    },
    {
      name: &quot;webkit&quot;,
      use: {
        headless: true,
        browserName: &quot;webkit&quot;,
        ignoreHTTPSErrors: true,
        screenshot: {
          mode: &quot;only-on-failure&quot;,
          fullPage: true,
        },
        video: &quot;retain-on-failure&quot;,
      },
      retries: 1,
    },
    {
      name: &quot;edge&quot;,
      use: {
        headless: true,
        channel: &quot;msedge&quot;,
        ignoreHTTPSErrors: true,
        screenshot: {
          mode: &quot;only-on-failure&quot;,
          fullPage: true,
        },
        video: &quot;retain-on-failure&quot;,
      },
      retries: 1,
    },
    {
      name: &quot;iPhone_Safari&quot;,
      use: {
        headless: true,
        channel: &quot;webkit&quot;,
        ...devices[&quot;iPhone 13 Pro&quot;],
        ignoreHTTPSErrors: true,
        screenshot: {
          mode: &quot;only-on-failure&quot;,
          fullPage: true,
        },
        video: &quot;retain-on-failure&quot;,
      },
      retries: 1,
    },
    {
      name: &quot;Android&quot;,
      use: {
        headless: true,
        ignoreHTTPSErrors: true,
        screenshot: &quot;only-on-failure&quot;,
        video: &quot;retain-on-failure&quot;,
        channel: &quot;chromium&quot;,
        ...devices[&quot;Pixel 2&quot;],
      },
      retries: 1,
    },
  ],
  use: {
    headless: true,
    screenshot: {
      mode: &quot;only-on-failure&quot;,
      fullPage: true,
    },
    video: &quot;retain-on-failure&quot;,
  },

  expect: {
    timeout: 10000,
  },
  timeout: 250000,
  globalSetup: &quot;utils/globalSetup.ts&quot;,
  globalTeardown: &quot;global-teardown.ts&quot;,
  reporter: process.env.CI ?
    [[&quot;list&quot;], [&quot;html&quot;]] : [[&quot;list&quot;], [&quot;html&quot;],
    [
      &quot;allure-playwright&quot;,
      {
        detail: true,
        outputFolder: &quot;allure-results&quot;,
        suiteTitle: false,
      },
    ],
    ],
  workers: process.env.CI ? &quot;90%&quot; : &quot;70%&quot;,
};

export default config;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">PlaywrightTestConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"@playwright/test"</span><span class="pl-kos">;</span>

<span class="pl-k">const</span> <span class="pl-s1">config</span>: <span class="pl-smi">PlaywrightTestConfig</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
  <span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
    <span class="pl-kos">{</span>
      <span class="pl-c1">name</span>: <span class="pl-s">"Chrome"</span><span class="pl-kos">,</span>
      <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">browserName</span>: <span class="pl-s">"chromium"</span><span class="pl-kos">,</span>
        <span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">mode</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
          <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-c1">video</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-c1">retries</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-kos">{</span>
      <span class="pl-c1">name</span>: <span class="pl-s">"Firefox"</span><span class="pl-kos">,</span>
      <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">browserName</span>: <span class="pl-s">"firefox"</span><span class="pl-kos">,</span>
        <span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">mode</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
          <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-c1">video</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-c1">retries</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-kos">{</span>
      <span class="pl-c1">name</span>: <span class="pl-s">"webkit"</span><span class="pl-kos">,</span>
      <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">browserName</span>: <span class="pl-s">"webkit"</span><span class="pl-kos">,</span>
        <span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">mode</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
          <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-c1">video</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-c1">retries</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-kos">{</span>
      <span class="pl-c1">name</span>: <span class="pl-s">"edge"</span><span class="pl-kos">,</span>
      <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">channel</span>: <span class="pl-s">"msedge"</span><span class="pl-kos">,</span>
        <span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">mode</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
          <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-c1">video</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-c1">retries</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-kos">{</span>
      <span class="pl-c1">name</span>: <span class="pl-s">"iPhone_Safari"</span><span class="pl-kos">,</span>
      <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">channel</span>: <span class="pl-s">"webkit"</span><span class="pl-kos">,</span>
        ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"iPhone 13 Pro"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">mode</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
          <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-c1">video</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-c1">retries</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-kos">{</span>
      <span class="pl-c1">name</span>: <span class="pl-s">"Android"</span><span class="pl-kos">,</span>
      <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">screenshot</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
        <span class="pl-c1">video</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
        <span class="pl-c1">channel</span>: <span class="pl-s">"chromium"</span><span class="pl-kos">,</span>
        ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"Pixel 2"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-c1">retries</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
    <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
    <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span>
      <span class="pl-c1">mode</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
      <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-c1">video</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
  <span class="pl-kos">}</span><span class="pl-kos">,</span>

  <span class="pl-c1">expect</span>: <span class="pl-kos">{</span>
    <span class="pl-c1">timeout</span>: <span class="pl-c1">10000</span><span class="pl-kos">,</span>
  <span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-c1">timeout</span>: <span class="pl-c1">250000</span><span class="pl-kos">,</span>
  <span class="pl-c1">globalSetup</span>: <span class="pl-s">"utils/globalSetup.ts"</span><span class="pl-kos">,</span>
  <span class="pl-c1">globalTeardown</span>: <span class="pl-s">"global-teardown.ts"</span><span class="pl-kos">,</span>
  <span class="pl-c1">reporter</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ?
    <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-s">"list"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"html"</span><span class="pl-kos">]</span><span class="pl-kos">]</span> : <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-s">"list"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"html"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-kos">[</span>
      <span class="pl-s">"allure-playwright"</span><span class="pl-kos">,</span>
      <span class="pl-kos">{</span>
        <span class="pl-c1">detail</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">outputFolder</span>: <span class="pl-s">"allure-results"</span><span class="pl-kos">,</span>
        <span class="pl-c1">suiteTitle</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-c1">workers</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-s">"90%"</span> : <span class="pl-s">"70%"</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>

<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">config</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the workflow]</li>
</ul>
<p dir="auto"><strong>Expected</strong><br>
The github workflow should be able to determine workers based on specified config file</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">The tests run but just with one worker instead of 90% of logical CPU cores. The workflow works as expected if the worker index is a definite number e.g. 10/6</p>
<p dir="auto"><strong>Context</strong>: In long E2E test flows there are certain steps that are duplicated like moving in-between "Product" vs "shipping" vs "Payment method" tabs in an online order workflow.</p>
<p dir="auto"><strong>Problem</strong>: In Playwright-Test, duplicate test titles are not allowed as "error" (not as a warning) which is painful for someone who is migrating test scripts from other testing frameworks like "Jasmine" (as in my scenario) where duplicate test titles were allowed.</p>
<p dir="auto"><strong>Desired Solution</strong> : Is there a solution or setting, where this error can be avoided on the configuration level (preferably as a warning) without users to change change 100s of scripts manually porting from other test frameworks? Thanks!</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/104996068/166945789-ef35de00-a6e3-4b57-b0f0-68df20a5c923.png"><img src="https://user-images.githubusercontent.com/104996068/166945789-ef35de00-a6e3-4b57-b0f0-68df20a5c923.png" alt="image" style="max-width: 100%;"></a></p>