Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,16 @@ jobs:
- name: Run validated-statistics tests first
env:
R_LIBS_SITE: /usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library
run: julia --project=. -t2 --compiled-modules=no test/runtests.jl numeric_policy exact_summaries high_precision derived_analyses validated_statistics
shell: bash
run: |
set +e
julia --project=. -t2 --compiled-modules=no test/runtests.jl numeric_policy exact_summaries high_precision derived_analyses validated_statistics 2>&1 | tee /tmp/validated-statistics-tests.log
status="${PIPESTATUS[0]}"
if [ "$status" -ne 0 ]; then
enc() { head -c 3500 | sed -e 's/%/%25/g' -e 's/\r/%0D/g' | awk '{printf "%s%%0A", $0}'; }
echo "::error title=Validated-statistics tests failed::$(tail -n 120 /tmp/validated-statistics-tests.log | enc)"
fi
exit "$status"

- name: Run tests
env:
Expand Down
23 changes: 21 additions & 2 deletions scripts/check-julia-syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,35 @@
# Parse every tracked Julia source with the pinned runtime before CI spends time
# installing scientific/frontend dependencies. This checks syntax only; package
# loading and behavior remain covered by the test suite.
#
# Meta.parseall does not throw for every parser failure: an unterminated block
# can be returned as Expr(:incomplete), which a bare try/catch would accept.
# Parse each expression explicitly and reject both error and incomplete results.
files = sort(filter(f -> endswith(f, ".jl"),
split(read(`git ls-files -z`, String), '\0')))
failed = false
for file in files
issue = nothing
try
Meta.parseall(read(file, String))
source = read(file, String)
position = 1
while position <= ncodeunits(source)
ex, next_position = Meta.parse(source, position; filename=file)
if Meta.isexpr(ex, :error) || Meta.isexpr(ex, :incomplete)
issue = ex
break
end
next_position > position ||
error("Julia parser made no progress at code unit $position")
position = next_position
end
catch err
issue = err
end
if !isnothing(issue)
failed = true
println(stderr, "Julia parse failed in $file:")
println(stderr, sprint(showerror, err))
println(stderr, sprint(showerror, issue))
end
end
failed && exit(1)
Expand Down
2 changes: 1 addition & 1 deletion src/core/doi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -680,4 +680,4 @@ function publish_study(config::DOIConfig, study::AbstractString, run::AbstractSt
return receipt
end

end
end # module DOI
Loading