This repository was archived by the owner on Jun 13, 2026. It is now read-only.
feat: disable Docker push by default for local builds #11
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 Pipeline | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| PYTHON_VERSION: "3.11" | |
| jobs: | |
| lint-and-typecheck: | |
| name: Lint and Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| uv sync --frozen | |
| uv pip install ruff mypy types-PyYAML types-requests | |
| - name: Run ruff linter | |
| run: | | |
| uv run ruff check src/ tests/ main.py | |
| uv run ruff format --check src/ tests/ main.py | |
| - name: Run mypy type checker | |
| run: | | |
| uv run mypy src/ main.py --ignore-missing-imports | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| needs: lint-and-typecheck | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Run tests with coverage | |
| run: | | |
| uv run pytest tests/ -v --cov=src --cov-report=xml --cov-report=term | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| continue-on-error: true | |
| validate-docker: | |
| name: Validate Dockerfile | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Validate Dockerfile exists | |
| run: | | |
| if [ ! -f "Dockerfile" ]; then | |
| echo "Dockerfile not found!" | |
| exit 1 | |
| fi | |
| - name: Lint Dockerfile | |
| uses: hadolint/hadolint-action@v3.1.0 | |
| with: | |
| dockerfile: Dockerfile | |
| continue-on-error: true | |
| - name: Test Dockerfile build (single platform) | |
| run: | | |
| # Test that the Dockerfile can build successfully | |
| # We only test a single platform build here for speed | |
| docker build -t test-build:ci . | |
| # Verify the image was created | |
| docker images | grep test-build | |
| # Clean up | |
| docker rmi test-build:ci || true |