Skip to content

Commit 60a06f8

Browse files
committed
Configure CI to test with _oldest_ compatible dependencies on min Julia
We want to ensure that compatibility specifications are not accidentally violated by changes, so always test against what is declared to be the earliest compatible versions at least once.
1 parent 1c7cd2e commit 60a06f8

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
matrix:
2727
version:
2828
- 'min' # earliest supported
29+
- '1.9' # earliest with pkg extensions
2930
- '1' # latest release
3031
- 'pre'
3132
os:
@@ -39,13 +40,15 @@ jobs:
3940
version: ${{ matrix.version }}
4041
arch: ${{ matrix.arch }}
4142
- uses: julia-actions/cache@v2
43+
- uses: julia-actions/julia-downgrade-compat@v1
44+
if: ${{ contains(fromJSON('["min", "1.9"]'), matrix.version) }}
4245
- uses: julia-actions/julia-buildpkg@v1
4346
- uses: julia-actions/julia-runtest@v1
4447
- uses: julia-actions/julia-processcoverage@v1
45-
- uses: codecov/codecov-action@v4
48+
- uses: codecov/codecov-action@v5
4649
with:
4750
token: ${{ secrets.CODECOV_TOKEN }}
48-
file: lcov.info
51+
files: lcov.info
4952
docs:
5053
name: Documentation
5154
runs-on: ubuntu-latest

Project.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ KDEMakieExt = ["Makie"]
2020
KDEUnicodePlotsExt = ["UnicodePlots"]
2121

2222
[compat]
23-
Makie = "0.15 - 0.24"
23+
Distributions = "0.25.46"
24+
FFTW = "1.4"
25+
Makie = "0.15,0.16,0.17,0.18,0.19,0.20,0.21,0.22,0.23,0.24"
26+
PrecompileTools = "1.1"
2427
UnicodePlots = "3"
2528
julia = "1.6"
2629

2730
[extras]
31+
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
2832
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
2933
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"

test/extensions.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,17 @@ end
3838

3939
@testset "Makie" begin
4040
using CairoMakie
41+
using .Makie: plotfunc
4142
using Unitful
4243

4344
rv = rand(1000)
4445
K = kde(rv, lo = 0.0, hi = 1.0, boundary = :closed)
4546

4647
# simply test that invocation is not an error
47-
@test plot(K).plot isa Plot{lines}
48-
@test lines(K).plot isa Plot{lines}
49-
@test scatter(K).plot isa Plot{scatter}
50-
@test stairs(K).plot isa Plot{stairs}
48+
@test plotfunc(plot(K).plot) === lines
49+
@test plotfunc(lines(K).plot) === lines
50+
@test plotfunc(scatter(K).plot) === scatter
51+
@test plotfunc(stairs(K).plot) === stairs
5152

5253
# stairs has special behavior; check that the converted data correctly closes the
5354
# histogram
@@ -57,10 +58,13 @@ end
5758
@test y[end] [1.0, 0.0] atol=eps()
5859
@test y[end][1] == y[end-1][1]
5960

60-
# check that unitful KDEs plot as well
61-
Ku = kde(rv .* 1u"m", lo = 0.0, hi = 1.0, boundary = :closed)
62-
@test plot(Ku).plot isa Plot{lines}
63-
@test stairs(Ku).plot isa Plot{stairs}
61+
# unitful handling was added in Makie v0.21
62+
if isdefined(Makie, :UnitfulConversion)
63+
# check that unitful KDEs plot as well
64+
Ku = kde(rv .* 1u"m", lo = 0.0, hi = 1.0, boundary = :closed)
65+
@test plot(Ku).plot isa Plot{lines}
66+
@test stairs(Ku).plot isa Plot{stairs}
67+
end
6468
end
6569

6670
@testset "UnicodePlots" begin

0 commit comments

Comments
 (0)