Skip to content

Commit

Permalink
Test Julia 1.10 (#2626)
Browse files Browse the repository at this point in the history
* Test Julia 1.10

* Disable Forward compat test 🤔

* Bump Symbolics to v5.5.1 in MacroAnalysis test
  • Loading branch information
Pangoraw authored Aug 13, 2023
1 parent 1d2c303 commit f297b12
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
# We test quite a lot of versions because we do some OS and version specific things unfortunately
julia-version: ["1.6", "1.7", "1.8", "1.9"] #, "nightly"]
julia-version: ["1.6", "1.7", "1.8", "1.9", "nightly"]
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
Expand Down
6 changes: 3 additions & 3 deletions test/MacroAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,15 @@ import Memoize: @memoize

@testset "Package macro 2" begin
🍭.options.evaluation.workspace_use_distributed = true

notebook = Notebook([
Cell("z = x^2 + y"),
Cell("@variables x y"),
Cell("""
begin
import Pkg
Pkg.activate(mktempdir())
Pkg.add(Pkg.PackageSpec(name="Symbolics", version="1"))
Pkg.add(Pkg.PackageSpec(name="Symbolics", version="5.5.1"))
import Symbolics: @variables
end
"""),
Expand All @@ -648,7 +648,7 @@ import Memoize: @memoize

@test cell(1) |> noerror
@test cell(2) |> noerror
@test cell(2) |> noerror
@test cell(3) |> noerror

update_run!(🍭, notebook, notebook.cells)

Expand Down
76 changes: 39 additions & 37 deletions test/packages/Basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -446,50 +446,52 @@ import Distributed
WorkspaceManager.unmake_workspace((🍭, notebook))
end

@testset "File format -- Forwards compat" begin
# Using Distributed, we will create a new Julia process in which we install Pluto 0.14.7 (before PlutoPkg). We run the new notebook file on the old Pluto.
p = Distributed.addprocs(1) |> first

@test post_pkg_notebook isa String

Distributed.remotecall_eval(Main, p, quote
path = tempname()
write(path, $(post_pkg_notebook))
import Pkg
# optimization:
if isdefined(Pkg, :UPDATED_REGISTRY_THIS_SESSION)
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
end
@static if VERSION v"1.9"
@testset "File format -- Forwards compat" begin
# Using Distributed, we will create a new Julia process in which we install Pluto 0.14.7 (before PlutoPkg). We run the new notebook file on the old Pluto.
p = Distributed.addprocs(1) |> first

@test post_pkg_notebook isa String

Distributed.remotecall_eval(Main, p, quote
path = tempname()
write(path, $(post_pkg_notebook))
import Pkg
# optimization:
if isdefined(Pkg, :UPDATED_REGISTRY_THIS_SESSION)
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
end

Pkg.activate(mktempdir())
Pkg.add(Pkg.PackageSpec(;name="Pluto",version=v"0.14.7"))
import Pluto
@assert Pluto.PLUTO_VERSION == v"0.14.7"
Pkg.activate(mktempdir())
Pkg.add(Pkg.PackageSpec(;name="Pluto",version=v"0.14.7"))
import Pluto
@assert Pluto.PLUTO_VERSION == v"0.14.7"

s = Pluto.ServerSession()
s.options.evaluation.workspace_use_distributed = false
s = Pluto.ServerSession()
s.options.evaluation.workspace_use_distributed = false

nb = Pluto.SessionActions.open(s, path; run_async=false)
nb = Pluto.SessionActions.open(s, path; run_async=false)

nothing
end)
nothing
end)

# Cells that use Example will error because the package is not installed.
# Cells that use Example will error because the package is not installed.

# @test Distributed.remotecall_eval(Main, p, quote
# nb.cells[1].errored == false
# end)
@test Distributed.remotecall_eval(Main, p, quote
nb.cells[2].errored == false
end)
# @test Distributed.remotecall_eval(Main, p, quote
# nb.cells[3].errored == false
# end)
# @test Distributed.remotecall_eval(Main, p, quote
# nb.cells[3].output.body == "25"
# end)
# @test Distributed.remotecall_eval(Main, p, quote
# nb.cells[1].errored == false
# end)
@test Distributed.remotecall_eval(Main, p, quote
nb.cells[2].errored == false
end)
# @test Distributed.remotecall_eval(Main, p, quote
# nb.cells[3].errored == false
# end)
# @test Distributed.remotecall_eval(Main, p, quote
# nb.cells[3].output.body == "25"
# end)

Distributed.rmprocs([p])
Distributed.rmprocs([p])
end
end

@testset "PkgUtils -- reset" begin
Expand Down

0 comments on commit f297b12

Please sign in to comment.