Commit ff3520e7 authored by nanahira's avatar nanahira

better workflow

parent 713d4dd5
Pipeline #9742 passed with stages
in 1 minute and 14 seconds
stages:
- install
- build
- deploy
variables:
GIT_DEPTH: "1"
build:
stage: build
tags:
npm_ci:
stage: install
tags:
- linux
script:
- npm ci
- npm run build
artifacts:
paths:
- node_modules
.build_base:
stage: build
tags:
- linux
dependencies:
- npm_ci
build:
extends: .build_base
script: npm run build
artifacts:
paths:
- dist/
test:
extends: .build_base
script: npm run test
upload_to_minio:
stage: deploy
dependencies:
......
......@@ -8,3 +8,8 @@
Dockerfile
/src
/dist/full
/coverage
/tests
/dist/tests
/dev
/dist/dev
......@@ -19,4 +19,10 @@ npm install --save-dev \
ts-loader \
webpack \
webpack-cli \
ws
ws \
ts-node \
@koishijs/plugin-console \
@koishijs/plugin-sandbox \
jest \
ts-jest \
@types/jest
......@@ -6,7 +6,9 @@
"types": "dist/index.d.ts",
"scripts": {
"lint": "eslint --fix .",
"build": "webpack && env PACK_ALL=1 webpack"
"build": "webpack && env PACK_ALL=1 webpack",
"start": "ts-node ./dev",
"test": "jest --passWithNoTests"
},
"repository": {
"type": "git",
......
......@@ -14,6 +14,8 @@
"allowJs": true,
"include": [
"*.ts",
"src/**/*.ts"
"src/**/*.ts",
"tests/**/*.ts",
"dev/**/*.ts"
]
}
......@@ -13,5 +13,3 @@ npm install --save-dev \
@types/jest \
ts-jest \
rimraf
mkdir tests || true
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