mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
* [monorepo] remove spurious package-name field from buildscript.txt * [monorepo] align variables/paths across build script variants * [monorepo] align linting/test setup for jobs/libraries * [monorepo] fix "make lint/lint_fix" from root * [wiki-algolia] integrate with yarn workspace GitOrigin-RevId: a0954f2936d03cd4a69b3f2c8098d9ee2e361993
60 lines
1.3 KiB
Makefile
60 lines
1.3 KiB
Makefile
# Run the test commands in the scope of the monorepo.
|
|
# Eslint and prettier (plus some configs) are on the root.
|
|
RUN_LINTING = ../../bin/run -w /overleaf/libraries/validation-tools monorepo yarn run --silent
|
|
RUN_LINTING_MONOREPO = ../../bin/run monorepo yarn run --silent
|
|
|
|
WITH_CACHE_FOLDER = \
|
|
lint \
|
|
lint_ci \
|
|
lint_fix \
|
|
format \
|
|
format_ci \
|
|
format_fix \
|
|
typecheck \
|
|
typecheck_ci \
|
|
|
|
$(WITH_CACHE_FOLDER): ../../node_modules/.cache/prettier/
|
|
../../node_modules/.cache/prettier/:
|
|
mkdir -p $@
|
|
|
|
$(WITH_CACHE_FOLDER): ../../node_modules/.cache/eslint/
|
|
../../node_modules/.cache/eslint/:
|
|
mkdir -p $@
|
|
|
|
format:
|
|
$(RUN_LINTING_MONOREPO) format libraries/validation-tools
|
|
|
|
format_ci:
|
|
$(RUN_LINTING_MONOREPO) format libraries/validation-tools
|
|
|
|
format_fix:
|
|
$(RUN_LINTING_MONOREPO) format:fix libraries/validation-tools
|
|
|
|
lint:
|
|
$(RUN_LINTING) lint
|
|
|
|
lint_ci:
|
|
-$(RUN_LINTING) lint --format json --output-file reports/eslint.json
|
|
sed -i 's_"filePath":"/overleaf_"filePath":"$(MONOREPO)_g' reports/eslint.json
|
|
|
|
lint_fix:
|
|
$(RUN_LINTING) lint:fix
|
|
|
|
typecheck:
|
|
$(RUN_LINTING) types:check
|
|
|
|
typecheck_ci:
|
|
$(RUN_LINTING) types:check
|
|
|
|
test: test_unit
|
|
test_unit:
|
|
ifneq (,$(wildcard test/unit))
|
|
$(RUN_LINTING) test:unit
|
|
endif
|
|
|
|
test: test_acceptance
|
|
test_acceptance:
|
|
ifneq (,$(wildcard test/acceptance))
|
|
$(RUN_LINTING) test:acceptance
|
|
endif
|