Skip to content
Snippets Groups Projects
Commit bc338a9c authored by florian's avatar florian
Browse files

TST: Add style check to pipeline

parent ab4647a5
Branches
Tags
No related merge requests found
Pipeline #9520 failed
......@@ -17,9 +17,31 @@ variables:
CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-julialib/testenv:latest
stages:
- code-style
- test
- deploy
# Only check style for Julia 1.6 since support for 1.0 may be dropped anyway
code-style:
image: julia:1.6
tags: [ docker ]
script:
# install JuliaFormatter
- julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
# try and format the files
- julia -e 'using JuliaFormatter; format(".", verbose=true)'
# check the git diff for possible changes due to the formatting
- julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
# Name a test and select an appropriate image.
# images comes from Docker hub
test:1.0:
......
using Documenter, CaosDB
makedocs(modules = [CaosDB], sitename = "CaosDB.jl Documentation")
makedocs(
modules=[CaosDB],
sitename="CaosDB.jl Documentation")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment