This isn’t maybe very well-known, but in GitHub Actions you can run commands using custom shells, including julia
.
For example, in a package I always want to test on CI a package using the latest development revision of a dependency. You can achieve this with a step like:
- name: Install extra dependency on main branch
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.add(PackageSpec(; name="AnExtraPackage", rev="main"))
This isn’t much different from the standard
- name: Install extra dependency on main branch
run: |
julia --project=. -e 'using Pkg; Pkg.add(PackageSpec(; name="AnExtraPackage", rev="main"))'
but using the custom shell makes it nicer to write a multiline Julia script.