Skip to main content.

GitHub Actions

You're going to finish the GitHub Action demo from Friday in GitHub's web interface

Set Up

  1. Log into GitHub
  2. Navigate to the repository you forked on Friday (called java-example)

GitHub Actions

  1. Click the Actions tab, click set up a workflow yourself.
  2. Copy the contents of this file into the new workflow file (main.yml).
  3. Click Start commit.
  4. Add a commit message.
  5. After you commit the file, I think the workflow starts right away. In a few minutes, the workflow fail.
  6. After the workflow fails (I had to click on the related commit message to see that it failed -- the web interface wasn't showing that it failed), click on build and view the logs.
    1. If it doesn't jump you to the test failure, expand the Test step. (Hopefully, you see the different steps that were taken to do the build.)
    2. You should see the logs from Maven. There is a lot of output. Search for tests on the page so that you can see the error that failed.
  7. Now that you know what test failed, right-click on the Code tab and open it in a new tab.
  8. Navigate to the test class ( so that you can look at which line in the test failed.
  9. Navigate to the source code (
  10. Edit the code (there is a pencil icon) so that it uses longs instead of ints, as appropriate, as discussed in class.
  11. Commit the code (describe the change you made).
  12. Go back to the Actions tab. You may see that the Workflow has already run. It is named by the commit message. If it didn't run, hang tight until it does.

    Hopefully, it passed! If not, go back and fix the code.

  13. View build's logs. Again, search for tests, so that you can see the tests passed.
  14. Click the Actions tab again.

Finishing up: What to turn in for this assignment

Take a screenshot of the "All Workflows" panel--showing the run that worked and the prior one that failed. For example: