DevExpress / testcafe-action

TestCafe test runner for GitHub Actions
https://testcafe.io
MIT License
36 stars 16 forks source link

when run with 2 versions of node, testcafe hangs #10

Closed benmonro closed 4 years ago

benmonro commented 4 years ago

when i run the testcafe action w/ 2 versions of node (see build config below). one of the runs will hang on the testcafe step. I can disable one or the other version of node and it works fine, but if i try to run both it hangs:

name: End-to-End Tests
on: [pull_request]

jobs:
  build:
    name: '${{ matrix.os }} node ${{ matrix.node }}'
    runs-on: '${{ matrix.os }}'
    strategy:
      matrix:
        os: [ubuntu-latest]
        node: [12, 10]
    steps:
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - uses: actions/checkout@v1
      - run: npm ci
      - run: npm run test:unit
      - name: Run TestCafe Tests
        uses: DevExpress/testcafe-action@latest
        with:
          args: 'chrome tests/testcafe'
AlexKamaev commented 4 years ago

I was not able to reproduce the issue. I used almost the same workflow:

name: End-to-End Tests
on: [push]

jobs:
  build:
    name: '${{ matrix.os }} node ${{ matrix.node }}'
    runs-on: '${{ matrix.os }}'
    strategy:
      matrix:
        os: [ubuntu-latest]
        node: [12, 10]
    steps:
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - uses: actions/checkout@v1
      - run: npm ci
      - name: Run TestCafe Tests
        uses: DevExpress/testcafe-action@latest
        with:
          args: 'chrome tests/testcafe'

Could you try to check my version? Does it work? I would appreciate if you provide more details on this issue, i.e. reference to the repo with github actions.

benmonro commented 4 years ago

doesn't work you can see the results here: https://github.com/testing-library/testcafe-testing-library/pull/112/checks?check_run_id=423496778

notice that the 2nd job will hang until it eventually gets cancelled.

I also noticed that it works fine in 1.6, but fails on anything past that.

AlexKamaev commented 4 years ago

I forked your repo, modified the tests and all workflows passed: https://github.com/AlexKamaev/testcafe-testing-library/actions/runs/34546088 As I see, you also added a comment to the https://github.com/DevExpress/testcafe/issues/4530 ticket. Could you please try to remove Chrome from your browser list and check your flows again?

benmonro commented 4 years ago

@AlexKamaev can you try running it a couple more times? Clearly you can see the problem in the pull request I showed you... What is different between mine and yours?

AlexKamaev commented 4 years ago

I checked your actions multiple times and now I confirm that it hangs sometimes, but only in Chrome. Firefox never hangs. I tried to change chrome to chrome:headless. This works for me. Could you try it? At the moment the cause of the issue is unclear. It can relate to #4530 or to the lack of RAM on github machines or something else.

name: testcafe-testing-library
on:
  push:
    branches:
      - 'master'
  pull_request:

jobs:
  test:
    name: 'node ${{ matrix.node }} ${{matrix.browser}}  ${{ matrix.os }} '
    runs-on: '${{ matrix.os }}'
    strategy:
      matrix:
        os: [ubuntu-latest]
        node: [12, 10]
        browser: ['chrome:headless', 'firefox']
    steps:
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - uses: actions/checkout@v1
      - run: npm ci
      - run: npm run validate
      - name: Run TestCafe Tests
        uses: DevExpress/testcafe-action@latest
        with:
          args: '${{ matrix.browser}} tests/testcafe'
benmonro commented 4 years ago

I can confirm this seems to work. I am using headless for both browsers, but will let keep an eye on it and reopen if issues come up.