diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07fcb3a..f3491a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,14 @@ name: ci on: - push: + workflow_dispatch: pull_request: + push: + branches: [master, v2] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true defaults: run: @@ -22,13 +28,10 @@ jobs: fail-fast: false matrix: version: - - '1.6' # lower declared julia compat in `Project.toml` + - '1.10' # lower declared julia compat in `Project.toml` - '1' os: [ubuntu-latest, windows-latest, macos-latest] arch: [x64] - include: - - os: ubuntu-latest - prefix: xvfb-run # julia-actions/julia-runtest/blob/master/README.md steps: - uses: actions/checkout@v4 @@ -36,10 +39,28 @@ jobs: with: version: ${{ matrix.version }} - uses: julia-actions/cache@v2 - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest - with: - prefix: ${{ matrix.prefix }} # for `xvfb-run` + - name: Develop RecipesBase, RecipesPipeline, PlotsBase, Plots + env: + JULIA_PKG_PRECOMPILE_AUTO: 0 + run: | + julia -e ' + using Pkg + Pkg.add([ + (; url="https://github.com/JuliaPlots/Plots.jl", subdir="RecipesBase", rev="v2"), + (; url="https://github.com/JuliaPlots/Plots.jl", subdir="RecipesPipeline", rev="v2"), + (; url="https://github.com/JuliaPlots/Plots.jl", subdir="PlotsBase", rev="v2"), + (; url="https://github.com/JuliaPlots/Plots.jl", rev="v2"), + ]) + Pkg.develop(; path=".") + ' + - name: Test GraphRecipes + run: | + cmd=(julia --color=yes) + if [ "$RUNNER_OS" == "Linux" ]; then + cmd=(xvfb-run ${cmd[@]}) + fi + echo ${cmd[@]} + ${cmd[@]} -e 'using Pkg; Pkg.test("GraphRecipes"; coverage=true)' Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" diff --git a/Project.toml b/Project.toml index 9323751..4c3ddc4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "GraphRecipes" uuid = "bd48cda9-67a9-57be-86fa-5b3c104eda73" -version = "0.5.13" +version = "1.0" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" @@ -17,16 +17,16 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [compat] -AbstractTrees = "0.3.1, 0.4" -GeometryTypes = "0.7.7, 0.8" +AbstractTrees = "0.4" +GeometryTypes = "0.8" Graphs = "1.7" -Interpolations = "0.12.8, 0.13 - 0.14, 0.15" -NaNMath = "0.3.3, 1" +Interpolations = "0.13 - 0.15" +NaNMath = "1" NetworkLayout = "0.4" PlotUtils = "0.6.2, 1" -RecipesBase = "0.7, 0.8, 1" +RecipesBase = "1" Statistics = "1" -julia = "1.6" +julia = "1.10" [extras] Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44" diff --git a/assets/julia_type_tree.png b/assets/julia_type_tree.png index b583431..0666a6e 100644 Binary files a/assets/julia_type_tree.png and b/assets/julia_type_tree.png differ diff --git a/assets/readme_julia_logo_pun.png b/assets/readme_julia_logo_pun.png index fe3c875..d9a471c 100644 Binary files a/assets/readme_julia_logo_pun.png and b/assets/readme_julia_logo_pun.png differ diff --git a/test/runtests.jl b/test/runtests.jl index 147b2b7..295cabf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -11,6 +11,8 @@ using Plots using Test using Gtk # for popup +import Plots: PlotsBase + isci() = get(ENV, "CI", "false") == "true" itol(tol = nothing) = something(tol, isci() ? 1e-3 : 1e-5) @@ -58,7 +60,7 @@ cd(joinpath(@__DIR__, "..", "assets")) do end @testset "README" begin - @plottest julia_logo_pun() "readme_julia_logo_pun.png" popup = !isci tol = itol() + @plottest julia_logo_pun() "readme_julia_logo_pun.png" popup = !isci() tol = itol() end end @@ -112,16 +114,16 @@ end @test GraphRecipes.directed_curve(0.0, 1.0, 0.0, 1.0, rng = rng) == GraphRecipes.directed_curve(0, 1, 0, 1, rng = rng) - @test GraphRecipes.isnothing(nothing) == Plots.isnothing(nothing) - @test GraphRecipes.isnothing(missing) == Plots.isnothing(missing) - @test GraphRecipes.isnothing(NaN) == Plots.isnothing(NaN) - @test GraphRecipes.isnothing(0) == Plots.isnothing(0) - @test GraphRecipes.isnothing(1) == Plots.isnothing(1) - @test GraphRecipes.isnothing(0.0) == Plots.isnothing(0.0) - @test GraphRecipes.isnothing(1.0) == Plots.isnothing(1.0) + @test GraphRecipes.isnothing(nothing) == PlotsBase.isnothing(nothing) + @test GraphRecipes.isnothing(missing) == PlotsBase.isnothing(missing) + @test GraphRecipes.isnothing(NaN) == PlotsBase.isnothing(NaN) + @test GraphRecipes.isnothing(0) == PlotsBase.isnothing(0) + @test GraphRecipes.isnothing(1) == PlotsBase.isnothing(1) + @test GraphRecipes.isnothing(0.0) == PlotsBase.isnothing(0.0) + @test GraphRecipes.isnothing(1.0) == PlotsBase.isnothing(1.0) for (s, e) in [(rand(rng), rand(rng)) for i in 1:100] - @test GraphRecipes.partialcircle(s, e) == Plots.partialcircle(s, e) + @test GraphRecipes.partialcircle(s, e) == PlotsBase.partialcircle(s, e) end @testset "nearest_intersection" begin