cypress: parallel-group-params-mismatch caused by browser (reopened)

Related to https://github.com/cypress-io/github-action/issues/121

First noticed April 30

Current behavior:

When running tests in parallel on GitHub actions, different containers have different browser versions, causing cypress to fail outright.

First container: Chrome 80.0.3987.163 Subsequent two containers:

This machine sent the following parameters:

{
  "osName": "linux",
  "osVersion": "Ubuntu Linux - 18.04",
  "browserName": "Chrome",
  "browserVersion": "81.0.4044.122",

Desired behavior:

Tests run in parallel shouldn’t have inconsistent configurations

Test code to reproduce

Job ran as follows:

 - name: cypress tests start
        uses: cypress-io/github-action@v1
        with:
          working-directory: ./frontend
          group: ${{ matrix.browser }}-${{ matrix.python-version }}
          browser: ${{ matrix.browser }}
          headless: true
          record: true
          parallel: true
          start: npx ws --spa -s index.html --hostname 0.0.0.0 --port 4200 --directory dist
          wait-on: http://localhost:4200
          wait-on-timeout: 30
        env:
          CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Versions

Cypress: 4.5.0 Browser: Chrome GitHub Actions: current

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

inspired by the instructions for Firefox

I added

 name: E2E on Chrome
 on: [push]
 jobs:
   cypress-run:
     runs-on: ubuntu-20.04
+    container:
+      image: cypress/browsers:node14.17.6-chrome100-ff98
     # let's make sure our tests pass on Chrome browser
     name: E2E on Chrome
     steps:
       - uses: actions/checkout@v2
       - uses: cypress-io/github-action@v2
         with:
           browser: chrome

it added 25s Initialize containers step in the workflow, but at least I get consistent browser version for my parallel jobs