question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Github actions: "Re-run failed jobs" will run the entire test suite

See original GitHub issue

We have the e2e tests configure to run on cypress dashboard parellely. I was following this thread to add the custom-build-id to the command to distinguish different run based on different build id. Every thing works fine until github actions roll out the ability to Re-run failed jobs. If i just set the custom-build-id to ${{ github.run_id }}, the second attempt will always marks tests as passing with ‘Run Finished’ but tests are not triggered at all. So I set set the custom-build-id to ${{ github.run_id }}-${{ github.run_attempt }}, now it will run the entire test suite instead of running the originally allocated subset of tests.

 E2E_tests:
    runs-on: ubuntu-latest
    name: E2E tests
    strategy:
      fail-fast: false
      matrix:
        ci_node_total: [6]
        ci_node_index: [0, 1, 2, 3, 4, 5]
    timeout-minutes: 45
    steps:
        - uses: actions/checkout@v2

        - name: Use Node.js
          uses: actions/setup-node@v2

        - name: Install Dependencies
          run: npm ci

        - name: Start app
          run: make start-app-for-e2e
          timeout-minutes: 5

        - name: Cypress Dashboard - Cypress run
          run: |
              npm run cypress

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:18
  • Comments:25 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
admahcommented, Sep 14, 2022

I was able to get some more clarity on this from our Cloud team. Issue #574 also has some additional context.

Here is the current status:

  • Before, there was an issue where all re-runs got a PASS, regardless of actual status. This issue has been fixed.
  • Currently, if a re-run is initiated, all specs get run on the machines available. That is not optimal. The Cloud team is looking into the connection between GH Actions and Cypress in order to set up re-runs to be accurate and efficient.

I will be updating this issue as new information is available.

5reactions
tebecocommented, May 13, 2022

That’s definitly something critical given how the billing works (Cypress and Github included), it sounds like we’re getting billed for something that already passed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Re-running workflows and jobs - GitHub Docs
You can re-run a workflow run, all failed jobs in a workflow run, or specific jobs in a workflow run up to 30...
Read more >
Save time with partial re-runs in GitHub Actions
It is now possible to re-run only failed jobs or a single job in GitHub Actions workflows. Save time with partial re-runs in...
Read more >
How to re-run only failed jobs on Github Actions - Medium
1. Set up a step to get the current timestamp - id: timestamp · 2. Name a cache container using the above timestamp...
Read more >
Only re-run the failed job in a GitHub Actions matrix
My CI matrix takes a lot of time to run, and I don't want to waste energy re-running the whole matrix because one...
Read more >
How to re-run only failed jobs on GitHub Actions - Testableapple
Yeah, the thing is that it restarts absolutely all the jobs (green, red, whatever), even if just the only one has failed. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found