Skip to content
Snippets Groups Projects
Unverified Commit bcc9dac1 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane: Committed by GitHub
Browse files

Merge pull request #55 from LCSB-BioCore/lh-move-formatter

Move JuliaFormatter to Gitlab CI
parents f91ecf12 4a55d5fb
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,6 @@ name: Documentation
on:
push:
branches:
- master
tags: '*'
jobs:
......
name: format-check
on:
push:
branches:
- 'master'
tags: '*'
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.3.0]
julia-arch: [x86]
os: [ubuntu-latest]
steps:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- uses: actions/checkout@v1
- name: Install JuliaFormatter and format
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(".", verbose=true)'
- name: Format check
run: |
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'
\ No newline at end of file
......@@ -2,17 +2,34 @@ image: $CI_REGISTRY/r3/docker/julia-custom
stages:
- test
- check
- deploy-doc
test:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
script:
- julia --project=@. -e "import Pkg; Pkg.test(; coverage = true)"
after_script:
- julia --project=test/coverage test/coverage/coverage-summary.jl
format:
stage: check
rules:
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
script:
- julia --project=@. -e 'using JuliaFormatter; format(".", verbose=true)'
after_script:
- julia --project=@. -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'
pages:
stage: deploy-doc
script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment