Add comprehensive E2E tests for materia CLI
- Add pytest and pytest-cov for testing - Add niquests for modern HTTP/2 support (keep requests for hcloud compatibility) - Create 13 E2E tests covering CLI, workers, pipelines, and secrets (71% coverage) - Fix Pulumi ESC environment path (beanflows/prod) and secret key names - Update GitLab CI to run CLI tests with coverage reporting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ cache:
|
||||
.uv_setup: &uv_setup
|
||||
- curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- export PATH="$HOME/.cargo/bin:$PATH"
|
||||
- source $HOME/.local/bin/env
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
@@ -32,7 +33,21 @@ lint:
|
||||
- uv run ruff check .
|
||||
- uv run ruff format --check .
|
||||
|
||||
test:
|
||||
test:cli:
|
||||
stage: test
|
||||
before_script:
|
||||
- *uv_setup
|
||||
script:
|
||||
- uv sync
|
||||
- uv run pytest tests/ -v --cov=src/materia --cov-report=xml --cov-report=term
|
||||
coverage: '/TOTAL.*\s+(\d+%)$/'
|
||||
artifacts:
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
|
||||
test:sqlmesh:
|
||||
stage: test
|
||||
before_script:
|
||||
- *uv_setup
|
||||
@@ -96,7 +111,7 @@ deploy:r2:
|
||||
- curl -fsSL https://get.pulumi.com/esc/install.sh | sh
|
||||
- export PATH="$HOME/.pulumi/bin:$PATH"
|
||||
- esc login --token ${PULUMI_ACCESS_TOKEN}
|
||||
- eval $(esc env open prod --format shell)
|
||||
- eval $(esc env open beanflows/prod --format shell)
|
||||
- |
|
||||
mkdir -p ~/.config/rclone
|
||||
cat > ~/.config/rclone/rclone.conf <<EOF
|
||||
|
||||
Reference in New Issue
Block a user