-
-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathjustfile
More file actions
89 lines (67 loc) · 2.08 KB
/
justfile
File metadata and controls
89 lines (67 loc) · 2.08 KB
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
import? 'adamghill.justfile'
import? '../dotfiles/just/justfile'
src := "src/django_unicorn"
# Install pre-commit hooks
install-pre-commit:
uv run --all-extras pre-commit install
# Run pre-commit on all files
lint:
uv run --all-extras pre-commit run --all-files
# List commands
_default:
just --list --unsorted --justfile {{ justfile() }} --list-heading $'Available commands:\n'
# Grab default `adamghill.justfile` from GitHub
fetch:
curl https://raw.githubusercontent.com/adamghill/dotfiles/master/just/justfile > adamghill.justfile
# Run the dev server for the example project
runserver:
-uv run --all-extras example/manage.py runserver 0:8080
# Run the Python matrix test suite
test-python-matrix:
act -W .github/workflows/python.yml -j test
# Run the JavaScript unit tests
test-js:
npm run-script test
# Run both Python and JS tests
test-all:
test-python-matrix
test-js
# Build the JavaScript library
js-build:
npm run build
# Install JS dependencies
js-install:
npm install
# Run Python unit tests
test-python:
-uv run --all-extras pytest -m 'not slow and not playwright'
# Run Python unit tests with benchmarks
test-python-benchmarks:
-uv run --all-extras pytest tests/benchmarks/ --benchmark-autosave --benchmark-only
# Run Python unit tests with compared benchmarks
test-python-benchmarks-compare:
-uv run --all-extras pytest tests/benchmarks/ --benchmark-only --benchmark-compare
# Run tests with coverage
test-python-coverage:
-uv run --all-extras pytest --cov=django_unicorn
type:
-uv run --all-extras ty check .
# Sphinx autobuild
docs-serve:
-uv run --all-extras sphinx-autobuild -W docs/source docs/build
# Build documentation
docs-build:
-uv run --all-extras sphinx-build -W docs/source docs/build
# Build everything (checks, JS, docs)
build:
just type
just test-python
just js-install
just js-build
just docs-build
# Run e2e tests
test-e2e:
uv run pytest tests/integration -m integration
# Run e2e tests with headed browser
test-e2e-headed:
uv run pytest tests/integration -m integration --headed