mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Separate test and lint steps
This commit is contained in:
@@ -24,6 +24,8 @@ jobs:
|
|||||||
run: flake8 .
|
run: flake8 .
|
||||||
- name: Check imports alphabetized
|
- name: Check imports alphabetized
|
||||||
run: isort --check-only ./app ./tests
|
run: isort --check-only ./app ./tests
|
||||||
|
- name: Run js lint
|
||||||
|
run: npm run lint
|
||||||
- name: Run js tests
|
- name: Run js tests
|
||||||
run: npm test
|
run: npm test
|
||||||
- name: Run py tests
|
- name: Run py tests
|
||||||
|
|||||||
@@ -58,12 +58,25 @@ generate-version-file: ## Generates the app version file
|
|||||||
@echo -e "__git_commit__ = \"${GIT_COMMIT}\"\n__time__ = \"${DATE}\"" > ${APP_VERSION_FILE}
|
@echo -e "__git_commit__ = \"${GIT_COMMIT}\"\n__time__ = \"${DATE}\"" > ${APP_VERSION_FILE}
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: ## Run tests
|
test: py-lint py-test js-test ## Run tests
|
||||||
|
|
||||||
|
.PHONY: py-lint
|
||||||
|
py-lint: ## Run python linting scanners
|
||||||
flake8 .
|
flake8 .
|
||||||
isort --check-only ./app ./tests
|
isort --check-only ./app ./tests
|
||||||
source $(NVMSH) && npm test
|
|
||||||
|
.PHONY: py-test
|
||||||
|
py-test: ## Run python unit tests
|
||||||
py.test -n auto --maxfail=10 tests/
|
py.test -n auto --maxfail=10 tests/
|
||||||
|
|
||||||
|
.PHONY: js-lint
|
||||||
|
js-lint: ## Run javascript linting scanners
|
||||||
|
source $(NVMSH) && npm run lint
|
||||||
|
|
||||||
|
.PHONY: js-test
|
||||||
|
js-test: ## Run javascript unit tests
|
||||||
|
source $(NVMSH) && npm test
|
||||||
|
|
||||||
.PHONY: fix-imports
|
.PHONY: fix-imports
|
||||||
fix-imports: ## Fix imports using isort
|
fix-imports: ## Fix imports using isort
|
||||||
isort ./app ./tests
|
isort ./app ./tests
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,8 @@
|
|||||||
"node": ">=10.15.3"
|
"node": ">=10.15.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "gulp lint && jest --config tests/javascripts/jest.config.js tests/javascripts",
|
"lint": "gulp lint",
|
||||||
|
"test": "jest --config tests/javascripts/jest.config.js tests/javascripts",
|
||||||
"test-watch": "jest --watch --config tests/javascripts/jest.config.js tests/javascripts",
|
"test-watch": "jest --watch --config tests/javascripts/jest.config.js tests/javascripts",
|
||||||
"build": "gulp",
|
"build": "gulp",
|
||||||
"watch": "gulp watch",
|
"watch": "gulp watch",
|
||||||
|
|||||||
Reference in New Issue
Block a user