Skip to content
Snippets Groups Projects

ci: actually check formatting

Merged q3k requested to merge q3k-ci-format into main
+ 7
18
stages:
- check
- build
- deploy
variables:
GIT_SUBMODULE_STRATEGY: recursive
@@ -38,8 +39,9 @@ mypy:
format:
stage: check
script:
- "git clean -fdx"
- "bash tools/format.sh"
- "[ -z \"$(git status --porcelain -u no)\" ] || (echo 'Differences found, please run tools/format.sh.' && git diff HEAD && exit 1)"
- "[ -z \"$(git status --porcelain)\" ] || (echo 'Differences found, please run tools/format.sh.' && git diff HEAD && exit 1)"
build-p3:
stage: build
@@ -68,27 +70,14 @@ build-p6:
paths: ['build/flow3r.elf']
expire_in: 5 hours
.pages: &pages
stage: build
pages:
stage: deploy
only:
- main
script:
- cd docs
- make html
- mv _build/html ../public
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
preview pages:
<<: *pages
artifacts:
paths: ['public']
# shorter artifacts keep duration to be storage friendly
expire_in: 10m
# only update public page for CI runs on protected default branch
pages:
<<: *pages
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
artifacts:
paths: ['public']
expire_in: 1d
Loading