Commit ae417402 authored by Stefan Cameron's avatar Stefan Cameron

Configuring GitLab CI

Unfortunately, there appears to be a bug with the job engine
whereby it doesn't wait for the Rollup build to finish before
it thinks it's actually done, and therefore doesn't save all
the build output files as artifacts because they just aren't
there yet when it saves the ./dist dir's contents.

I'll have to look into this later. The most important thing
for now is that the test stage works.
parent d6314245
Pipeline #31537466 passed with stages
in 2 minutes and 28 seconds
image: node:latest
before_script:
- node --version
- npm --version
- npm install
stages:
- build
- test
# cache modules in between jobs
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
run-build-lib:
stage: build
script:
- npm run build:lib
artifacts:
name: "build-lib-${CI_COMMIT_REF_SLUG}"
paths:
- dist/
run-build-internals:
stage: build
script:
- npm run build:internals
artifacts:
name: "build-internals-${CI_COMMIT_REF_SLUG}"
paths:
- dist_tools/
run-tests:
stage: test
script:
- npm test
artifacts:
name: "coverage-${CI_COMMIT_REF_SLUG}"
paths:
- coverage/
......@@ -17,6 +17,7 @@
"reporter": [
"text",
"text-summary",
"json-summary",
"html"
]
}
......@@ -3,8 +3,8 @@
"version": "0.0.1",
"description": "Runtime Verification Library for browsers and Node.js.",
"engines": {
"node": "^10.11.0",
"npm": "^6.4.1"
"node": ">=10.11.0",
"npm": ">=6.4.1"
},
"main": "dist/rtv.umd.min.js",
"module": "dist/rtv.esm.min.js",
......@@ -18,13 +18,16 @@
"scripts": {
"precommit:msg": "echo 'Running pre-commit checks...'",
"precommit:docs": "git add API.md",
"clean": "rm -rf ./build",
"clean:internals": "rm -rf ./dist_tools",
"clean:lib": "rm -rf ./dist",
"clean": "npm run clean:lib && npm run clean:internals",
"start": "npm run build:lib && npm run node",
"node": "node -r ./tools/node.js --inspect",
"node:build": "npm run build:lib && npm run node",
"node:internals": "rollup -c tools/rollup.internals.js && node -r ./dist_tools/internals.js --inspect",
"build:lib": "BABEL_ENV=build rollup -c",
"build": "npm run clean && npm run build:lib",
"node:internals": "npm run build:internals && node -r ./dist_tools/internals.js --inspect",
"build:internals": "npm run clean:internals && rollup -c tools/rollup.internals.js",
"build:lib": "npm run clean:lib && BABEL_ENV=build rollup -c",
"build": "npm run build:lib",
"docs": "jsdoc2md -f \"src/**/*.js\" -f \"src/**/*.jsdoc\" --heading-depth 1 > API.md",
"lint": "eslint ./*.js \"src/**/*.js\" \"test/**/*.js\" \"tools/**/*.js\"",
"test:unit": "BABEL_ENV=test mocha -c -r mocha-setup.js \"./test/**/*.test.js\"",
......
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