diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index 494f426..47a538c 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -113,28 +113,17 @@ jobs: error("No downstream Project.toml at $downstream_project") Pkg.activate(downstream_project) @info "Selected downstream project" downstream_project - try - # force it to use this PR's version of the package - upstream_projects = filter(!isempty, strip.(split(ENV["UPSTREAM_SUBDIRS"], ','))) - isempty(upstream_projects) && error("No upstream package projects selected") - upstream_projects = normpath.(upstream_projects) - for project in upstream_projects - isfile(joinpath(project, "Project.toml")) || - error("No upstream Project.toml at $project") - end - @info "Selected upstream projects" upstream_projects - Pkg.develop(map(project -> PackageSpec(path=project), upstream_projects)) - Pkg.update() - Pkg.test(coverage=${{ inputs.coverage }}) # resolver may fail with test time deps - catch err - err isa Pkg.Resolve.ResolverError || rethrow() - - # If we can't resolve that means this is incompatible by SemVer and this is fine - # It means we marked this as a breaking change, so we don't need to worry about - # Mistakenly introducing a breaking change, as we have intentionally made one - @info "Not compatible with this release. No problem." exception=err - exit(0) # Exit immediately, as a success + upstream_projects = filter(!isempty, strip.(split(ENV["UPSTREAM_SUBDIRS"], ','))) + isempty(upstream_projects) && error("No upstream package projects selected") + upstream_projects = normpath.(upstream_projects) + for project in upstream_projects + isfile(joinpath(project, "Project.toml")) || + error("No upstream Project.toml at $project") end + @info "Selected upstream projects" upstream_projects + Pkg.develop(map(project -> PackageSpec(path=project), upstream_projects)) + Pkg.update() + Pkg.test(coverage=${{ inputs.coverage }}) - uses: julia-actions/julia-processcoverage@v1 diff --git a/test/runtests.jl b/test/runtests.jl index 67fba1a..f4ac534 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -494,6 +494,13 @@ end @test first(activate_at) < first(develop_at) < first(test_at) end +@testset "downstream.yml propagates resolver failures" begin + txt = read(joinpath(@__DIR__, "..", ".github", "workflows", "downstream.yml"), String) + @test !occursin("Pkg.Resolve.ResolverError", txt) + @test !occursin("Not compatible with this release", txt) + @test !occursin("exit(0)", txt) +end + # A 32-bit (x86/i686) Julia leg needs the i386 loader + C/C++ runtime installed # BEFORE setup-julia runs julia, or the run dies with `spawn .../x86/bin/julia # ENOENT`. Assert tests.yml has that install step, gates it on a 32-bit arch on