build: replace make with test script
This commit is contained in:
parent
67e3687b50
commit
b71c168a7f
|
|
@ -12,7 +12,7 @@ pipeline {
|
|||
}
|
||||
|
||||
stage('Test') {
|
||||
steps { sh 'make test' }
|
||||
steps { sh './test.sh' }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
22
Makefile
22
Makefile
|
|
@ -1,22 +0,0 @@
|
|||
.PHONY: help render validate test check
|
||||
|
||||
INPUT ?= examples/example-report.yaml
|
||||
OUTPUT ?= build/report.pdf
|
||||
|
||||
help:
|
||||
@echo 'make render INPUT=report.yaml OUTPUT=report.pdf'
|
||||
@echo 'make validate INPUT=report.yaml'
|
||||
@echo 'make test'
|
||||
|
||||
render:
|
||||
bash tools/render.sh "$(INPUT)" --output "$(OUTPUT)"
|
||||
|
||||
validate:
|
||||
bash tools/validate.sh "$(INPUT)"
|
||||
|
||||
test:
|
||||
uv venv --python 3.11 --allow-existing .venv
|
||||
uv pip sync --python .venv/bin/python requirements.txt
|
||||
.venv/bin/python -m unittest discover -s tests -p 'test_*.py' -v
|
||||
|
||||
check: test
|
||||
10
README.md
10
README.md
|
|
@ -19,14 +19,6 @@ and DejaVu Sans Mono.
|
|||
|
||||
## Render a report
|
||||
|
||||
```bash
|
||||
make render \
|
||||
INPUT=examples/example-report.yaml \
|
||||
OUTPUT=output/example-report.pdf
|
||||
```
|
||||
|
||||
Or call the renderer directly:
|
||||
|
||||
```bash
|
||||
bash tools/render.sh report.yaml --output report.pdf
|
||||
```
|
||||
|
|
@ -45,7 +37,7 @@ command name.
|
|||
## Validate a report
|
||||
|
||||
```bash
|
||||
make validate INPUT=examples/example-report.yaml
|
||||
bash tools/validate.sh examples/example-report.yaml
|
||||
```
|
||||
|
||||
The version 1 format supports metadata, branding, summaries, timelines,
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ authoring are documented in the main [README](../README.md) and
|
|||
|
||||
## Test environment
|
||||
|
||||
Tests require uv and Typst. The Makefile creates `.venv`, synchronizes the pinned
|
||||
Tests require uv and Typst. `test.sh` creates `.venv` and synchronizes the pinned
|
||||
packages from `requirements.txt`, and invokes Python only from that environment.
|
||||
|
||||
```bash
|
||||
make test
|
||||
./test.sh
|
||||
```
|
||||
|
||||
Poppler's `pdfinfo` and `pdftotext` enable additional pagination and extracted
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ PDF rendering are implemented by the standalone component.
|
|||
Typst and Bash are required at runtime. From this component checkout:
|
||||
|
||||
```bash
|
||||
make validate INPUT=examples/example-report.yaml
|
||||
make validate INPUT=examples/example-report.json
|
||||
make test
|
||||
bash tools/validate.sh examples/example-report.yaml
|
||||
bash tools/validate.sh examples/example-report.json
|
||||
./test.sh
|
||||
```
|
||||
|
||||
`make test` creates and synchronizes `.venv` with uv before invoking Python.
|
||||
`./test.sh` creates and synchronizes `.venv` with uv before invoking Python.
|
||||
Python is not used by validation or rendering. Validation needs no sibling repositories and works
|
||||
from any working directory using explicit paths. It writes no files. Exit codes:
|
||||
0 valid, 1 invalid/unreadable input or missing dependencies, 2 CLI usage error.
|
||||
|
|
@ -25,7 +25,7 @@ Errors identify the offending JSON path; unsupported file extensions are rejecte
|
|||
After installing Typst:
|
||||
|
||||
```bash
|
||||
make render INPUT=examples/example-report.yaml OUTPUT=output/report.pdf
|
||||
bash tools/render.sh examples/example-report.yaml --output output/report.pdf
|
||||
```
|
||||
|
||||
Validation always runs before Typst. Relative branding assets resolve from the
|
||||
|
|
|
|||
Loading…
Reference in New Issue