Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Guillaume Grossetie
asciidoc.org
Commits
d979ee4d
Commit
d979ee4d
authored
Feb 24, 2022
by
Guillaume Grossetie
🎧
Browse files
add continuous integration (linter)
parent
cd6d9d7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
d979ee4d
workflow
:
rules
:
-
if
:
$CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_PIPELINE_SOURCE == 'schedule' || $CI_PIPELINE_SOURCE == 'web'
# See https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
-
if
:
$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS ==
null
&& $CI_COMMIT_BRANCH !~ /^docs\//
variables
:
GIT_DEPTH
:
'
5'
DEFAULT_NODE_VERSION
:
'
16'
LINUX_DISTRO
:
bullseye
NPM_CONFIG_CACHE
:
&npm_cache_dir
.cache/npm
NPM_CONFIG_FUND
:
'
false'
NPM_CONFIG_PREFER_OFFLINE
:
'
true'
default
:
image
:
node:$DEFAULT_NODE_VERSION-$LINUX_DISTRO
interruptible
:
true
.rules
:
-
&if_docs_mr
rules
:
-
if
:
&docs_mr
$CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^docs\//
-
&unless_docs_mr
rules
:
-
if
:
*docs_mr
when
:
never
-
if
:
$CI_JOB_NAME == 'lint' && $CI_PIPELINE_SOURCE == 'push' && $CI_PROJECT_PATH != 'antora/antora-lunr-extension'
when
:
manual
-
when
:
on_success
lint
:
stage
:
.pre
<<
:
*unless_docs_mr
before_script
:
-
node -p '`${os.type()} ${os.release()}\nNode.js ${process.version}`'
-
npm ci --quiet
cache
:
&npm_cache
key
:
npm-cache
paths
:
-
*npm_cache_dir
policy
:
pull
script
:
-
npm run lint
# this job signals success to the MR UI
docs
:
stage
:
test
<<
:
*if_docs_mr
script
:
echo 'we love docs!'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment