feat: per-destination single-purpose replicator (duckling) + feed hardening #211
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| with: | |
| version: "0.12.*" | |
| python-version: "3.12" | |
| - name: Lock check | |
| run: uv lock --check | |
| - name: Format check | |
| run: uv run --frozen ruff format --check --exclude viaduck/_version.py viaduck/ tests/ | |
| - name: Lint | |
| run: uv run --frozen ruff check viaduck/ tests/ | |
| - name: Unit tests | |
| run: uv run --frozen pytest tests/unit | |
| - name: Integration tests | |
| run: uv run --frozen pytest tests/integration | |
| dependency-review: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0 | |
| with: | |
| fail-on-severity: moderate | |
| # SPDX `AND` is conjunction: every atom in a package's license | |
| # expression must be on this list. Python-2.0 and 0BSD appear in | |
| # PSF-family expressions (typing-extensions, etc.). | |
| allow-licenses: Apache-2.0, MIT, BSD-2-Clause, BSD-3-Clause, PSF-2.0, Python-2.0, 0BSD | |
| # Per-package exemptions for license-metadata noise, mirroring the | |
| # millpond CI precedent: | |
| # - typing-extensions PSF-licensed in substance (same family as | |
| # CPython); its PEP 639 expression includes GPL-1.0-or-later | |
| # atoms from the historical CNRI/BeOpen license chain, which | |
| # the conjunction rule would otherwise reject. | |
| # - psycopg, psycopg-binary LGPL-3.0-or-later: we link, don't | |
| # modify; LGPL terms are satisfied — accepted as a | |
| # PostHog-cloud-infra precedent (see millpond's ci.yaml). | |
| # - certifi MPL-2.0: file-level copyleft satisfied by using the | |
| # unmodified CA bundle; dev-only transitive of | |
| # testcontainers -> requests. | |
| allow-dependencies-licenses: >- | |
| pkg:pypi/typing-extensions, | |
| pkg:pypi/psycopg, | |
| pkg:pypi/psycopg-binary, | |
| pkg:pypi/certifi | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| # Pin d2 to the version used locally: SVG output is deterministic per | |
| # version, and the stale-diagram diff below depends on that. just comes | |
| # from its release tarball too — Ubuntu's apt just predates the | |
| # [group(...)] attribute the justfile uses. | |
| - name: Install d2 and just | |
| run: | | |
| curl -fsSL https://github.com/terrastruct/d2/releases/download/v0.7.1/d2-v0.7.1-linux-amd64.tar.gz \ | |
| | sudo tar -xz -C /usr/local --strip-components=1 d2-v0.7.1/bin/d2 | |
| curl -fsSL https://github.com/casey/just/releases/download/1.52.0/just-1.52.0-x86_64-unknown-linux-musl.tar.gz \ | |
| | sudo tar -xz -C /usr/local/bin just | |
| - name: Render diagrams | |
| run: just docs | |
| # Committed SVGs must match their .d2 sources — a diff here means | |
| # someone edited a diagram without re-rendering (or vice versa). | |
| - name: Check diagrams are not stale | |
| run: git diff --exit-code docs/ | |
| - name: Docs link check | |
| run: just docs-check | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Build Docker image | |
| run: docker build --build-arg VIADUCK_VERSION=0.0.0.dev0 -t viaduck . |