mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
Make check and npm run check now run similar steps (#3722)
This commit is contained in:
committed by
GitHub
parent
c42ec3bd87
commit
e98d428030
6
.mocharc-min.yml
Normal file
6
.mocharc-min.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
recursive: true
|
||||
ignore: test/filter-tests.js
|
||||
require:
|
||||
- esm
|
||||
- ts-node/register
|
||||
- source-map-support/register
|
||||
13
Makefile
13
Makefile
@@ -39,7 +39,8 @@ $(NODE_MODULES): package.json | node-installed
|
||||
|
||||
.PHONY: lint
|
||||
lint: $(NODE_MODULES) ## Checks if the source currently matches code conventions
|
||||
$(NPM) run ts-compile
|
||||
$(NPM) run format-check
|
||||
$(NPM) run ts-check
|
||||
$(NPM) run lint-check
|
||||
|
||||
.PHONY: lint-fix
|
||||
@@ -55,10 +56,16 @@ test: $(NODE_MODULES) ## Runs the tests
|
||||
$(NPM) run test
|
||||
@echo Tests pass
|
||||
|
||||
.PHONY: test-min
|
||||
test-min: $(NODE_MODULES) ## Runs the minimal tests
|
||||
$(NPM) run test-min
|
||||
@echo Tests pass
|
||||
|
||||
.PHONY: check
|
||||
check: $(NODE_MODULES) test lint ## Runs all checks required before committing (fixing trivial things automatically)
|
||||
check: $(NODE_MODULES) lint test ## Runs all checks required before committing (fixing trivial things automatically)
|
||||
|
||||
.PHONY: pre-commit
|
||||
pre-commit: $(NODE_MODULES) test ci-lint
|
||||
pre-commit: $(NODE_MODULES) test-min ci-lint
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Cleans up everything
|
||||
|
||||
@@ -158,8 +158,10 @@
|
||||
"lint": "eslint . --fix",
|
||||
"lint-check": "eslint .",
|
||||
"lint-files": "eslint",
|
||||
"test": "mocha --recursive",
|
||||
"check": "npm run lint-check && npm run test -- --reporter min",
|
||||
"test": "mocha -b",
|
||||
"test-min": "mocha -b --config .mocharc-min.yml",
|
||||
"fix": "npm run lint && npm run format && npm run ts-check",
|
||||
"check": "npm run format-check && npm run ts-check && npm run lint-check && npm run test-min -- --reporter min",
|
||||
"dev": "cross-env NODE_ENV=DEV node -r esm -r ts-node/register app.js",
|
||||
"debugger": "cross-env NODE_ENV=DEV node --inspect -r esm -r ts-node/register app.js --debug",
|
||||
"debug": "cross-env NODE_ENV=DEV node -r esm -r ts-node/register app.js --debug",
|
||||
|
||||
Reference in New Issue
Block a user