forked from PrairieLearn/PrairieLearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
97 lines (84 loc) · 2.5 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
build:
@yarn turbo run build
build-sequential:
@yarn turbo run --concurrency 1 build
python-deps:
@python3 -m pip install -r images/plbase/python-requirements.txt --root-user-action=ignore
deps:
@yarn
@$(MAKE) python-deps build
migrate:
@yarn migrate
migrate-dev:
@yarn migrate-dev
refresh-workspace-hosts:
@yarn refresh-workspace-hosts
refresh-workspace-hosts-dev:
@yarn refresh-workspace-hosts-dev
dev: start-support
@yarn dev
dev-workspace-host: start-support
@yarn dev-workspace-host
dev-all: start-support
@$(MAKE) -s -j2 dev dev-workspace-host
start: start-support
@yarn start
start-workspace-host: start-support
@yarn start-workspace-host
start-executor:
@node apps/prairielearn/dist/executor.js
start-all: start-support
@$(MAKE) -s -j2 start start-workspace-host
update-database-description:
@yarn workspace @prairielearn/prairielearn pg-describe postgres -o ../../database
start-support: start-postgres start-redis start-s3rver
start-postgres:
@docker/start_postgres.sh
start-redis:
@docker/start_redis.sh
start-s3rver:
@docker/start_s3rver.sh
test: test-js test-python
test-js: start-support
@yarn turbo run test
test-js-dist: start-support
@yarn turbo run test:dist
test-python:
@python3 -m pytest
test-prairielearn: start-support
@yarn workspace @prairielearn/prairielearn run test
check-dependencies:
@yarn depcruise apps/*/src apps/*/assets packages/*/src
lint: lint-js lint-python lint-html lint-links
lint-js:
@yarn eslint --ext js --report-unused-disable-directives "**/*.{js,ts}"
@yarn prettier --check "**/*.{js,ts,mjs,cjs,mts,cts,md,sql,json,yml,html,css}"
lint-python:
@python3 -m ruff check ./
@python3 -m ruff format --check ./
lint-html:
@yarn htmlhint "testCourse/**/question.html" "exampleCourse/**/question.html"
lint-links:
@node tools/validate-links.mjs
format: format-js format-python
format-js:
@yarn eslint --ext js --fix "**/*.{js,ts}"
@yarn prettier --write "**/*.{js,ts,mjs,cjs,mts,cts,md,sql,json,yml,html,css}"
format-python:
@python3 -m ruff check --fix ./
@python3 -m ruff format ./
typecheck: typecheck-js typecheck-python
# This is just an alias to our build script, which will perform typechecking
# as a side-effect.
# TODO: Do we want to have a separate typecheck command for all packages/apps?
# Maybe using TypeScript project references?
typecheck-tools:
@yarn tsc
typecheck-js:
@yarn turbo run build
typecheck-python:
@yarn pyright --skipunannotated
changeset:
@yarn changeset
@yarn prettier --write ".changeset/**/*.md"
ci: lint typecheck check-dependencies test