test: scaffold pytest suite with mise, uv and Task

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobias KaupatandClaude Sonnet 5.5 committed 2026-10-19 14:53:06 +02:00
1 parent 31f06b5d9b
commit b94795ee8d
8 files changed
+511

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
version: "3"
vars:
IMAGE: '{{.IMAGE | default "restic-backup-docker:test"}}'
env:
IMAGE: "{{.IMAGE}}"
tasks:
default:
cmds:
- task --list
silent: true
build:
desc: Build the image under test
cmds:
- docker build --quiet -t {{.IMAGE}} .
lint:
desc: Lint the Python test suite with ruff
cmds:
- uv run ruff check tests
- uv run ruff format --check tests
test:
desc: Build the image and run all suites
cmds:
- task: build
- task: test:structure
- task: test:compat
- task: test:features
test:structure:
desc: Run container-structure-test against the image
cmds:
- container-structure-test test --image {{.IMAGE}} --config test/structure.yml
test:compat:
desc: Run the compat tests
cmds:
- uv run pytest -m "not feature" {{.CLI_ARGS}}
test:features:
desc: Run the feature-gated tests
cmds:
- uv run pytest -m feature {{.CLI_ARGS}}