refactor: extract Dataset._build_pipeline() to eliminate 4x pipeline duplication #103
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Install the project | |
| run: uv sync --locked --dev | |
| - name: Run ruff check | |
| run: uv run ruff check src/ tests/ | |
| - name: Run ruff format check | |
| run: uv run ruff format --check src/ tests/ | |
| # | |
| pilot: | |
| name: Pilot (py3.14, redis7) | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| environment: | |
| name: test | |
| services: | |
| redis: | |
| image: public.ecr.aws/docker/library/redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run tests with coverage | |
| run: uv run pytest --cov=atdata --cov-report=xml --cov-report=term --junitxml=junit.xml -o junit_family=legacy | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| report_type: test_results | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # | |
| test_matrix: | |
| name: Test matrix (py${{ matrix.python-version }}, redis${{ matrix.redis-version }}) | |
| runs-on: ubuntu-latest | |
| needs: [pilot] | |
| environment: | |
| name: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13", "3.14"] | |
| redis-version: [6, 7] | |
| exclude: | |
| - python-version: "3.14" | |
| redis-version: 7 | |
| services: | |
| redis: | |
| image: public.ecr.aws/docker/library/redis:${{ matrix.redis-version }} | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run tests | |
| run: uv run pytest | |
| # |