Commit f8ae278b authored by Guillaume Grossetie's avatar Guillaume Grossetie 🎧
Browse files

simple gitlab CI

parent 37df0221
Pipeline #2109 failed with stage
in 1 minute and 25 seconds
workflow: image: node:latest
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_PIPELINE_SOURCE == 'schedule' || $CI_PIPELINE_SOURCE == 'web' cache:
# See https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines paths:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_BRANCH !~ /^docs\// - node_modules/
variables:
GIT_DEPTH: '5' test_async:
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
tags:
- exoscale
.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: script:
- npm run lint - npm install
# this job signals success to the MR UI
docs:
stage: test
<<: *if_docs_mr
script: echo 'we love docs!'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment