Build got was canceled unexpectedly

While running the build command, the job got cancalled for some unexpected reason.

https://github.com/gitthermal/thermal/runs/202804644#step:5:414

2 Likes

Thanks for being here @mittalyashu, I believe you got this going? If you have any other issues please feel free to post again. In the meantime, we’re looking forward to seeing you around!

This is the configuration for the GitHub action workflow I am using but it is not working.

name: Greetings

on: issues

on:
  # Remove PRs from dependabot
  pull_request:
    branches:
      - '!dependabot/*'

Here’s the error message, I am getting in the Actions tab.

 

No, I am still facing this same issue.

Apologies for the delay, taking a look at your action I feel it might be a syntax issue, see this image and give it a go, let us know if it works.

Screen Shot 2019-09-11 at 3.22.05 PM.png

If you’d like listen to two events, such as issues and pull_request send this is a list to on: for example: on: [issues, pull_request]. Hope that helps.

I want to ignore few of branches from pull requests, that’s why I have added.

on:
  issues:
  # Remove PRs from dependabot
  pull_request:
    branches:
      - '!dependabot/*'

You are using the matrix for your actions, and one thing about the matrix is that it will fail fast if one of the tests didn’t pass [ref].

In your workflow Linux build on node 12.x didn’t pass which case everything else to cancel.

To solve this, you should use fail-fast: false within your strategy

So your workflow file should be like:

name: Test & Build
on: push

jobs:
  Test:
    name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
**fail-fast: false** matrix:
        node_version: [8.x, 10.x, 12.x]
        os: [ubuntu-latest, windows-latest, macOS-latest]

    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Set Node.js version ${{ matrix.node_version }}
        uses: actions/setup-node@v1
        with:
          version: ${{ matrix.node_version }}

      - name: Install packages
        run: npm install

      - name: Run lint
        run: npm run lint

  Linux:
    name: Linux build on node ${{ matrix.node_version }}
    runs-on: ubuntu-latest
    strategy:
**fail-fast: false** matrix:
        node_version: [8.x, 10.x, 12.x]

    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Set Node.js version ${{ matrix.node_version }}
        uses: actions/setup-node@v1
        with:
          version: ${{ matrix.node_version }}

      - name: Install packages
        run: npm install

      - name: Run build
        run: npm run build:linux
2 Likes

I wrote a big answer but for some reason I cant find it so I’ll make it short.

Use fail-fast in your matrix https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast

The build got canceled because one of your linux biuld failed, this one:

Linux build on node 12.x
5 Likes

Ah! I see.

I will fix it and give it a spin!