feat: enable rust core by default and add non-rust e2e smoke #226
Workflow file for this run
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] | |
| jobs: | |
| lint: | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Setup Python | |
| run: uv python install 3.9 | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Check formatting | |
| run: uv run ruff format --check drift/ tests/ | |
| - name: Lint | |
| run: uv run ruff check drift/ tests/ | |
| typecheck: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Setup Python | |
| run: uv python install 3.9 | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Type check | |
| run: uv run ty check drift/ tests/ | |
| test: | |
| name: Unit Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.14"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Setup Python | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Cache uv + Python installs + venv | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.local/share/uv/python | |
| .venv | |
| key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }} | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Run unit tests | |
| if: matrix.python-version != '3.9' | |
| run: uv run pytest tests/unit/ -q | |
| - name: Run unit tests with coverage | |
| if: matrix.python-version == '3.9' | |
| run: uv run pytest tests/unit/ -q --cov=drift/core --cov-report=xml | |
| - name: Upload coverage to Coveralls | |
| if: matrix.python-version == '3.9' && github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| file: coverage.xml | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Setup Python | |
| run: uv python install 3.9 | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Build package | |
| run: uv build | |
| - name: Verify package can be installed | |
| run: | | |
| uv venv /tmp/test-install | |
| uv pip install dist/*.whl --python /tmp/test-install/bin/python | |
| /tmp/test-install/bin/python -c "import drift; print('Package imported successfully')" |