Skip to content
Snippets Groups Projects
Unverified Commit 9e680bd5 authored by Nayeem Rahman's avatar Nayeem Rahman Committed by Alexander Harkness
Browse files

Add format checking and linting as npm scripts

Also rename some CI jobs
parent 7da24d23
Branches
No related tags found
1 merge request!52Add format checking and linting as npm scripts
Pipeline #104019 passed
...@@ -22,7 +22,7 @@ submodule_fetch: ...@@ -22,7 +22,7 @@ submodule_fetch:
- src/signalbuddy - src/signalbuddy
- src/yjs - src/yjs
node_install: npm_install_prod:
stage: deps stage: deps
dependencies: dependencies:
- submodule_fetch - submodule_fetch
...@@ -36,7 +36,7 @@ node_install: ...@@ -36,7 +36,7 @@ node_install:
- src/signalbuddy - src/signalbuddy
- src/yjs - src/yjs
dev_node_install: npm_install:
stage: deps stage: deps
dependencies: dependencies:
- submodule_fetch - submodule_fetch
...@@ -50,42 +50,42 @@ dev_node_install: ...@@ -50,42 +50,42 @@ dev_node_install:
- src/signalbuddy - src/signalbuddy
- src/yjs - src/yjs
check_format: format_check:
stage: check stage: check
dependencies: dependencies:
- dev_node_install - npm_install
script: script:
- npx prettier --ignore-path .gitignore --check "**/*.{html,js,json,md}" - npm run format-check
lint: lint:
stage: check stage: check
dependencies: dependencies:
- dev_node_install - npm_install
script: script:
- npx eslint --ignore-path .gitignore "**/*.js" - npm run lint
backend_build: build:
stage: build stage: build
dependencies: dependencies:
- dev_node_install - npm_install
script: script:
- npm run build - npm run build
artifacts: artifacts:
paths: paths:
- public/ - public/
backend_test: test:
stage: test stage: test
dependencies: dependencies:
- dev_node_install - npm_install
script: script:
- npm test - npm test
deploy: deploy:
stage: deploy stage: deploy
dependencies: dependencies:
- node_install - npm_install_prod
- backend_build - build
only: only:
- master - master
script: script:
......
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
"test": "jest --testPathIgnorePatterns src/liowebrtc src/rtcpeerconnection src/signalbuddy src/yjs", "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-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", "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" "validate": "npm ls"
}, },
"dependencies": { "dependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment