-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 2.87 KB
/
Copy pathci.yml
File metadata and controls
67 lines (65 loc) · 2.87 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
name: ci
on:
push: { branches: [main] }
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
- name: Sync
run: uv sync --all-packages --all-groups
- name: Lint
run: uv run ruff check .
- name: Lint (contract)
run: uv run ruff check contract
- name: Types (runtime)
run: uv run mypy continuo_python_runtime
- name: Types (contract)
run: uv run mypy contract/continuo_engine_contract
- name: Types (postgres adapter)
run: uv run --package continuo-postgres-adapter mypy adapters/postgres/continuo_postgres_adapter
- name: Types (trino adapter)
run: uv run --package continuo-trino-adapter mypy adapters/trino/continuo_trino_adapter
# `-m "not image"` deselects tests/test_image_smoke_validation.py, which
# needs a built engine image and the env naming it. Those tests run in
# images.yml's smoke jobs, where an image actually exists. `and not
# integration` deselects the csv-reader/validation-runner tests that
# need a real minio backend (started via `docker run` by the
# `minio_container` fixture, not docker-compose) -- those run in the
# dedicated step below, on the same runner, where docker is available.
- name: Tests (runtime)
run: uv run pytest --cov=continuo_python_runtime -m "not image and not integration" -v
- name: Tests (runtime, integration)
run: uv run pytest tests/test_csv_readers_integration.py tests/test_validation_runner.py -m integration -v
- name: Tests (contract)
run: uv run pytest contract/tests -v
- name: Tests (adapter units)
run: uv run pytest adapters/postgres/tests adapters/trino/tests -m "not integration" -v
integration-postgres:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
- run: uv sync --all-packages --all-groups
- name: Start postgres stack
run: docker compose -f tests/smoke/postgres-stack/docker-compose.yml up -d --wait
- name: Tests (postgres integration)
run: uv run pytest adapters/postgres/tests -m integration -v
- name: Tear down postgres stack
if: always()
run: docker compose -f tests/smoke/postgres-stack/docker-compose.yml down -v
integration-trino:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
- run: uv sync --all-packages --all-groups
- name: Start trino stack
run: docker compose -f tests/smoke/trino-stack/docker-compose.yml up -d --wait
- name: Tests (trino integration)
run: uv run pytest adapters/trino/tests -m integration -v
- name: Tear down trino stack
if: always()
run: docker compose -f tests/smoke/trino-stack/docker-compose.yml down -v