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:
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
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
image: node:latest
cache:
paths:
- *npm_cache_dir
policy: pull
- node_modules/
test_async:
script:
- npm run lint
# this job signals success to the MR UI
docs:
stage: test
<<: *if_docs_mr
script: echo 'we love docs!'
- npm install
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