Navigating GitHub Actions

To navigate to the actions tab, click on the 'Actions' tab circled near the top of the page.

  1. This is the box that contains all of the Actions workflows that have been run, will be run, or are running for a particular repository. Workflows are a series of tests run to determine if a PR, commit, or release is up to the desired standards and is correctly working. Unless you're releasing libraries, you'll only need to worry about the 'build' workflow.
  2. This icon tells you the status of the workflow. A green check means it has run successfully. A red X means it has failed, and an orange circle means it is either waiting to run or currently running.
  3. This menu allows you to filter by Workflow. However in this case there is only one workflow.
  4. You can click on the bolded title to the left of number 4 to see the readout from the workflow.

When your PR fails

As soon as you open a PR, you should see a box with an orange border. It will tell you the status of you PR. While the workflow is running, it will say "Some checks haven't completed yet."

The Actions CI often takes a few minutes to run, but depending on the amount of workflows currently being run, and the size of the repository, it could be longer or shorter. Below, you can see that the PR is currently failing actions. To find out what specific test it is failing, you can click on one of four places. First, you can click on the red X to the left of the commit hash. Second, you can click on the red X to the left of the GitHub logo in the orange box. You can also click on details, on the same line as the previous but all the way to the right. Finally, you can click on the 'Actions' tab at the top of the page. This works but it isn't ideal as you'll have to navigate to the test for your PR.

Now that you're on the Actions page for that specific commit, you can find out what test is causing it to fail. There are three tests a PR will fail on: test platforms, clang, and doxygen. In this case, the test platforms check is failing.

Note: If one test is failing, tests that run after it will not run

We can see that there appears to be a typo on line 48 of the bunny.ino example. Now, open the file causing the failure, fix the line that was causing issues, and commit and push the changes.

Now that we've fixed the typo, and committed and pushed those changes, we can check back in with the PR. It's still failing, so we can navigate to the Actions page again.

It looks like the test_platforms check is now passing, but the clang formatting isn't. To see what changes you should make, look at the lines that have single pluses and minuses after the line number. Replace the lines that have minuses with lines that have pluses. You can also run clang-format locally. To find out how to do that, click the button below.

Now, run clang-format in your local repository, and commit and push the changes. If you didn't set up the command to make running clang easier that's mentioned above, you can still either make the changes manually or by running clang-format -i on the file with the issues. In this case, I would want to run clang-format -i Adafruit_BNO055.cpp and clang-format -i Adafruit_BNO055.h.

The PR is still failing, but on a different check, so we should check the Actions workflow output again.

The good news is that the clang check is no longer failing. However, it appears that doxygen is failing. Click on the doxygen dropdown to see that test's output. It looks like I inadvertently removed a function's documentation. 

To find out how to run Doxygen locally to fix this error, read the next two pages: "Doxygen" and "Doxygen tips"

This guide was first published on Nov 25, 2020. It was last updated on Nov 25, 2020.

This page (Testing with GitHub Actions) was last updated on Apr 10, 2021.

Text editor powered by tinymce.