forked from redruin1/factorio-draftsman
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
56 lines (40 loc) · 1.59 KB
/
justfile
File metadata and controls
56 lines (40 loc) · 1.59 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
set windows-shell := ["powershell.exe", "-c"]
pytest-args := "-Werror"
_no_target_provided:
@just --list --unsorted
# Run 'lint + test + report-coverage'
ci: lint test report-coverage
# Run 'lint + test-targeted + report-coverage'
ci-waypoints: lint test-waypoints report-coverage
# Run 'lint + test-all + report-coverage'
ci-all: lint test-all report-coverage
# Run black and ruff
lint *args:
uv run black draftsman examples test
uv run ruff check draftsman {{args}}
# Run test suite against {current Factorio version, all Python versions}
test: _test310 _test311 _test312 _test313
_test310:
uv run "--isolated" "--python=3.10" coverage run -p
_test311:
uv run "--isolated" "--python=3.11" coverage run -p
_test312:
uv run "--isolated" "--python=3.12" coverage run -p
_test313:
uv run "--isolated" "--python=3.13" coverage run -p
# Run test suite against {specific Factorio versions, latest Python version}
test-waypoints:
uv run "--isolated" "--python=3.13" python test/test_waypoint_factorio_versions.py
# Run test suite against {all Factorio versions, latest Python version} (LONG)
test-all: _giga-test313
# Ideally, we might want to run this test against all supported python versions,
# but that is a LOT of tests
_giga-test313:
uv run "--isolated" "--python=3.13" python test/test_all_factorio_versions.py
# Combine all coverage files and create HTML report
report-coverage:
- uv run coverage combine
uv run coverage html
# Run benchmark tests and save profiles for this Draftsman version
benchmark:
uv run pytest --benchmark-autosave test/performance