With the release of julia-actions/setup-julia v2.2.0 for GitHub actions it is now possible to use new named version specifiers:
'lts'
for the Long Term Support (LTS) julia version (currently v1.6.7)'pre'
for the latest pre-release (currently v1.11.0-rc1)
So a typical test.yml might look like:
name: CI
on: [push, pull_request]
# needed for julia-actions/cache to delete old caches
permissions:
actions: write
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
julia-version:
- 'lts' # long-term support release
- '1' # latest stable 1.x release
- 'pre' # latest stable prerelease
# - 'nightly'
os:
- ubuntu-latest
include:
- os: windows-latest
julia-version: '1'
- os: macOS-latest
julia-version: '1'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
N.B. some choose to include nightly
, but because GitHub actions doesn’t currently support allowed failures it can be a little noisy/distracting. The new 'pre'
option serves as a less eager way to stay on top of testing with upcoming versions.