Skip to content

Commit

Permalink
Add JuliaFormatter and JET to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frankier committed Aug 2, 2024
1 parent 6d5da02 commit d46a4c6
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 6 deletions.
6 changes: 5 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ Distributions = "0.25.76"
DocStringExtensions = "^0.9"
FillArrays = "1"
FittedItemBanks = "^0.3.0, ^0.4.0, ^0.5.0, ^0.6.0"
JET = "0.9.7"
JuliaFormatter = "1.0.59"
Makie = "^0.18.0, ^0.19.0, ^0.20.0, ^0.21.0"
PsychometricsBazaarBase = "^0.6, ^0.7"
XUnit = "^1.1.6"
julia = "^1.8"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
XUnit = "3e3c03f2-1a94-11e9-2981-050a4ca824ab"

[targets]
test = ["Aqua", "XUnit"]
test = ["Aqua", "JET", "JuliaFormatter", "XUnit"]
8 changes: 8 additions & 0 deletions test/format.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using JuliaFormatter
using AdaptiveTestPlots

@testcase "format" begin
dir = pkgdir(AdaptiveTestPlots)
@test format(dir * "/src"; overwrite = false)
@test format(dir * "/test"; overwrite = false)
end
15 changes: 15 additions & 0 deletions test/jet.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using JET
using AdaptiveTestPlots

@testset "JET checks" begin
rep = report_package(
AdaptiveTestPlots;
target_modules = (
AdaptiveTestPlots,
),
mode = :typo
)
@show rep
@test length(JET.get_reports(rep)) <= 0
#@test_broken length(JET.get_reports(rep)) == 0
end
6 changes: 1 addition & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using XUnit

@testset runner=ParallelTestRunner() xml_report=true "top" begin
@testset "aqua" begin
include("./aqua.jl")
end
end
runtests("tests_top.jl", ARGS...)
13 changes: 13 additions & 0 deletions test/tests_top.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using XUnit

@testset "aqua" begin
include("./aqua.jl")
end

@testset "jet" begin
include("./jet.jl")
end

@testset "format" begin
include("./format.jl")
end

0 comments on commit d46a4c6

Please sign in to comment.