Actions not triggering on PR

The last few days I’ve been experiencing intermittent issues with tests not running on a pull-request. I haven’t seen this occurring on the main branch, but I haven’t made many commits to it so I can’t say for certain that it’s not happening there.

Here’s an example from the logs where the test for the first 3 pushes (which were all pushed together) were skipped, but the next push 4 hours later the test ran for, as well as the one after it.

Here’s the workflow file if it matters:

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
    types:
      - opened
      - reopened
      - synchronize

name: Master

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2

      - name: Use Node.js v12
        uses: actions/setup-node@v1.4.0
        with:
          node-version: 12

      - name: Setup MySQL
        uses: mirromutth/mysql-action@v1.1
        with:
          mysql version: '5.7'
          mysql database: 'test'
          mysql root password: 'password'

      - name: Install
        run: npm ci

      - name: Set ENV
        run: echo "MYSQL_PASS=\"password\"" > .env

      - name: Test
        run: npm test

@bayssmekanique,

Here are few points you may need to know, please check with them in your case:

  1. When you push multiple commits at once, the workflows will be triggered only for the latest commit contained in the this push. It is designed as that.

  2. In addition, when you use the GITHUB_TOKEN to authenticate when pushing commits, the push event will not trigger a new workflow run.

    When you use the repository’s GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions app, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.

@brightran, I understand the first point, but as you can see from the timestamps, the action didn’t run on the last commit of the 3 I pushed together.

As for the second point, all of these pushes were made using the exact same “git push” command from the same location with the same authentication mechanism, so I don’t think that would have any effect here.

Any other thoughts/suggestions?

@bayssmekanique,

Looks like, there indeed are some issues occur. Maybe the GitHub services have some issues occur recently.
I noticed a GitHub Incident below that may be relevant:

This incident had been resolved few days ago.