Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading