Skip to content

Commit b7fad08

Browse files
committed
also test the powerdynamics examples
1 parent 2818175 commit b7fad08

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,19 +197,23 @@ jobs:
197197
ref: ${{ steps.extract-branch.outputs.powerdynamics_branch }}
198198
path: PowerDynamics
199199
- name: Run PowerDynamics tests
200-
shell: julia --project=PowerDynamics --color=yes {0}
200+
shell: julia --project=PowerDynamics/docs --color=yes {0}
201201
run: |
202202
using Pkg
203-
try
204-
pkg"dev ."
205-
Pkg.test(; coverage=false)
206-
catch e
207-
if e isa Pkg.Resolve.ResolverError
208-
@info "Resolve error! No need to test a breaking release..." e
209-
exit(0)
210-
else
211-
rethrow(e)
212-
end
203+
using Test
204+
pkg"dev ."
205+
@testset "PowerDynamics Downstream Tests" begin
206+
@testset "Normal Package tests" begin
207+
Pkg.test("PowerDynamics"; coverage=false)
208+
end
209+
@testset "Documentation Example Tests" begin
210+
examples = joinpath("PowerDynamics", "docs", "examples")
211+
for file in readdir(examples; join=true)
212+
endswith(file, ".jl") || continue
213+
@info "Test example $file"
214+
include(file)
215+
end
216+
end
213217
end
214218
- name: Save Julia depot cache on cancel or failure
215219
id: julia-cache-save

0 commit comments

Comments
 (0)