forked from PrairieLearn/PrairieLearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (73 loc) · 2.32 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
build:
@yarn turbo run build
@node packages/compiled-assets/dist/cli.js build ./assets ./public/build
python-deps:
@python3 -m pip install -r images/plbase/python-requirements.txt --root-user-action=ignore
deps:
@yarn
@make python-deps build
dev:
@yarn turbo run dev
start: start-support
@node server.js
start-nodemon: start-support
@yarn nodemon server.js
start-workspace-host: start-support kill-running-workspaces
@node workspace_host/interface.js
start-workspace-host-nodemon: start-support kill-running-workspaces
@yarn nodemon --config workspace_host/nodemon.json workspace_host/interface.js
start-executor:
@node executor.js
kill-running-workspaces:
@docker/kill_running_workspaces.sh
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: test-prairielearn test-prairielib test-grader-host test-workspace-host test-packages
test-prairielearn: start-support
@yarn mocha --parallel "tests/**/*.test.{js,mjs}"
test-prairielearn-serial: start-support
@yarn mocha "tests/**/*.test.{js,mjs}"
test-prairielib:
@yarn mocha "prairielib/**/*.test.{js,mjs}"
test-grader-host:
@yarn mocha "grader_host/**/*.test.{js,mjs}"
test-workspace-host:
@yarn mocha "workspace_host/**/*.test.{js,mjs}"
test-packages:
@yarn turbo run test
test-python:
# `pl_unit_test.py` has an unfortunate file name - it matches the pattern that
# pytest uses to discover tests, but it isn't actually a test file itself. We
# explicitly exclude it here.
@python3 -m pytest --ignore graders/python/python_autograder/pl_unit_test.py
lint: lint-js lint-python lint-html lint-links
lint-js:
@yarn eslint --ext js --report-unused-disable-directives "**/*.js"
@yarn prettier --check "**/*.{js,ts,md,sql}"
lint-python:
@python3 -m flake8 ./
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"
@yarn prettier --write "**/*.{js,ts,md,sql}"
format-python:
@python3 -m isort ./
@python3 -m black ./
typecheck: typecheck-js typecheck-python
typecheck-js:
@yarn tsc
typecheck-python:
@yarn pyright --skipunannotated
changeset:
@yarn changeset
ci: lint typecheck test