Commit ff3520e7 authored by nanahira's avatar nanahira

better workflow

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