I was able to get this to work. I relied on chatGPT4o heavily for suggestions. I’m not sure completely why this works, but it seems to be necessary to remove one of the unregistered packages and then reinstall it each time the github action installs my package and dependencies. The tests take a long time now (lots of precompilation). But at least they actually succeed in running.
I would love feedback/explanation of why its necessary to rm and reinstall one of my unregistered dependencies…
Here is my working CI.yaml file:
name: Runtests
on: [push, pull_request]
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.9']
julia-arch: [x64]
os: [ubuntu-latest, macOS-latest, windows-latest]
#os: [macOS-latest]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
#- uses: julia-actions/cache@v2
- run: |
julia -e '
import Pkg;
Pkg.activate("."); # Activate the project environment
# Not sure why removing and reinstalling the SNF package is necessary, but it is
Pkg.rm("SmithNormalForm"); # Remove any existing installation of SNFer
Pkg.add(url="https://github.com/glwhart/Spacey.jl"); # Re-add Spacey from the URL
Pkg.add(url="https://github.com/wildart/SmithNormalForm.jl"); # Add the unregistered SNF package
'
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}