Using Julia in GitHub Actions

Hey everyone,

I’ve created a GitHub Action that sets up a Julia environment as a base for CI and other automation tasks.

The action lets you setup 32- and 64-bit Julia environments on all supported OSes (Windows Server 2016 & 2019, Ubuntu 16.04 & 18.04 and macOS X Mojave 10.14).

It still lacks some features like version shortcuts or support for nightly builds but it’s enough to try out GH Actions so I’ve decided to share it already. Check the readme for more info on what’s still missing.

Example workflow: Manually running package tests
name: Run tests

on: [push, pull_request]

    runs-on: ${{ matrix.os }}
        julia-version: [1.0.4, 1.2.0, 1.3.0-rc1]
        julia-arch: [x64, x86]
        os: [ubuntu-latest, windows-latest, macOS-latest]
        # 32-bit Julia binaries are not available on macOS
          - os: macOS-latest
            julia-arch: x86
      - uses: actions/checkout@v1.0.0
      - name: "Set up Julia"
        uses: julia-actions/setup-julia@v0.2
          version: ${{ matrix.julia-version }}
          arch: ${{ matrix.julia-arch }}
      - name: "Run tests"
        run: |
          julia --project=@. -e "using Pkg; Pkg.instantiate();"
          julia --project=@. -e "using Pkg; Pkg.test(\"Example\");"

You can find “real world” examples in the Exercism.jl package and in the Exercism Julia track, a non-package project.

More infos about setting up workflows in general can be found in the GitHub docs.

Actions allow you to hook into any repo event, not just pushes and PRs which could be used for some interesting automation that doesn’t require running and trusting apps.
Even if you’re not interested in that, I think they are worth a look because in my (limited) testing, they run a lot faster than Travis CI and also allow more parallel builds.

If you run into any issues, please open an issue and if you create any Julia-related actions, please share them, I’m interested to see what people use them for!


If you’ve tried them out or are interested in actions, I’d like to hear some input on the following issue that came up about what package CI workflows should look like:

I have completely moved StringBuilders.jl over to use these new GitHub Actions for its CI testing. So far so good. It seems really fast, plus we get Windows, Mac and Linux all in one service (and all running in parallel).

The current configuration looks like this.

Just be warned: we are still tinkering with the exact design of these actions, so at this point this is probably not super stable in terms of the API of these actions.


The current configuration looks like this .

got 404 :sob:

PkgTemplates.jl has up-to-date example workflows: Testing & Coverage, Testing & Docs deployment

Unfortunately, there seems to be an issue with the julia-actions/julia-uploadcodecov, see, for instance, Coverage reports don’t get uploaded. Is there any solution to this? Should I file an issue somewhere?

I’ve actually moved away from the julia-uploadcodecov action and am using the native codecov action instead. Main benefit is that it should work without a token in many cases. You can take a look at what I’m using right now here.