|
49 | 49 | with: |
50 | 50 | files: lcov.info |
51 | 51 | token: ${{ secrets.CODECOV_TOKEN }} |
| 52 | + testoldest: |
| 53 | + name: Test Lower Compat Bounds |
| 54 | + runs-on: ubuntu-latest |
| 55 | + # Only run on release branches: pinning QuantumControl's direct dependencies |
| 56 | + # to the lowest versions allowed by their `[compat]` bounds generally only |
| 57 | + # has a consistent solution for a released version, not while a breaking |
| 58 | + # sibling version is still under development on `master`/`dev`. |
| 59 | + if: startsWith(github.ref, 'refs/heads/release-') |
| 60 | + # Informational only: a failure here must not fail the overall workflow. |
| 61 | + continue-on-error: true |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v6 |
| 64 | + - uses: julia-actions/setup-julia@v3 |
| 65 | + with: |
| 66 | + # Oldest supported Julia (the `julia` compat lower bound). |
| 67 | + version: '1.10' |
| 68 | + - uses: julia-actions/cache@v3 |
| 69 | + - name: "Pin direct dependencies to their compat floors" |
| 70 | + # Rewrite the `[compat]` entries in the root Project.toml to their lowest |
| 71 | + # allowed versions (`strict`), so QuantumControl's *direct* dependencies |
| 72 | + # are tested at their floor. |
| 73 | + uses: julia-actions/julia-downgrade-compat@v1 |
| 74 | + with: |
| 75 | + projects: "." |
| 76 | + strict: "true" |
| 77 | + skip: "LinearAlgebra,Logging,Printf" |
| 78 | + - name: "Instantiate test environment" |
| 79 | + shell: julia --color=yes --project=test {0} |
| 80 | + run: | |
| 81 | + import Pkg |
| 82 | + # Dev-install the package under test from the current checkout, so the |
| 83 | + # downgraded compat bounds above take effect. On Julia < 1.11 the |
| 84 | + # `[sources]` entry in test/Project.toml is ignored, so QuantumControl |
| 85 | + # would otherwise be taken from the registry. |
| 86 | + Pkg.develop(Pkg.PackageSpec(path=pwd())) |
| 87 | + Pkg.instantiate() |
| 88 | + Pkg.status() |
| 89 | + - name: "Run tests" |
| 90 | + shell: julia --color=yes --project=test --depwarn="yes" --check-bounds="yes" {0} |
| 91 | + run: | |
| 92 | + include(joinpath(pwd(), "test", "runtests.jl")) |
52 | 93 | docs: |
53 | 94 | name: Documentation |
54 | 95 | runs-on: ubuntu-latest |
|
0 commit comments