diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c334e6cb01556c29d2e001314e3e524aeb943ef1..3739d9e6b63681257df33e1c1ae685225651c4da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ submodule_fetch: - src/signalbuddy - src/yjs -node_install: +npm_install_prod: stage: deps dependencies: - submodule_fetch @@ -36,7 +36,7 @@ node_install: - src/signalbuddy - src/yjs -dev_node_install: +npm_install: stage: deps dependencies: - submodule_fetch @@ -50,42 +50,42 @@ dev_node_install: - src/signalbuddy - src/yjs -check_format: +format_check: stage: check dependencies: - - dev_node_install + - npm_install script: - - npx prettier --ignore-path .gitignore --check "**/*.{html,js,json,md}" + - npm run format-check lint: stage: check dependencies: - - dev_node_install + - npm_install script: - - npx eslint --ignore-path .gitignore "**/*.js" + - npm run lint -backend_build: +build: stage: build dependencies: - - dev_node_install + - npm_install script: - npm run build artifacts: paths: - public/ -backend_test: +test: stage: test dependencies: - - dev_node_install + - npm_install script: - npm test deploy: stage: deploy dependencies: - - node_install - - backend_build + - npm_install_prod + - build only: - master script: diff --git a/package.json b/package.json index 38cc9623d196a30ce85e5f27239bfbd1b9a4caf7..9ddfab440f3758b5d10458a77ac9af59975bd799 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,9 @@ "test": "jest --testPathIgnorePatterns src/liowebrtc src/rtcpeerconnection src/signalbuddy src/yjs", "test-changed": "jest --only-changed --testPathIgnorePatterns src/liowebrtc src/rtcpeerconnection src/signalbuddy src/yjs", "test-coverage": "jest --coverage --testPathIgnorePatterns src/liowebrtc src/rtcpeerconnection src/signalbuddy src/yjs", - "lint": "jshint .", + "format": "prettier --ignore-path .gitignore --check --write '**/*.{html,js,json,md}'", + "format-check": "prettier --ignore-path .gitignore --check '**/*.{html,js,json,md}'", + "lint": "eslint --ignore-path .gitignore '**/*.js'", "validate": "npm ls" }, "dependencies": {