release: v0.3.0b2 #76
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: Run tests with `uv` | |
| 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/ | |
| test: | |
| name: Test (py${{ matrix.python-version }}, redis${{ matrix.redis-version }}) | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| redis-version: [6, 7] | |
| 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: Start Redis | |
| uses: supercharge/redis-github-action@1.8.1 | |
| with: | |
| redis-version: ${{ matrix.redis-version }} | |
| - name: Run tests with coverage | |
| run: uv run pytest --cov=atdata --cov-report=xml --cov-report=term | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| benchmark: | |
| name: Benchmarks | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| permissions: | |
| contents: write | |
| actions: write | |
| 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 just | |
| uses: extractions/setup-just@v2 | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Start Redis | |
| uses: supercharge/redis-github-action@1.8.1 | |
| with: | |
| redis-version: 7 | |
| - name: Run benchmarks | |
| run: just bench | |
| - name: Copy report to docs | |
| run: | | |
| mkdir -p docs/benchmarks | |
| cp .bench/report.html docs/benchmarks/index.html | |
| - name: Commit updated benchmark docs | |
| if: github.event_name == 'push' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/benchmarks/index.html | |
| git diff --cached --quiet || git commit -m "docs: update benchmark report [skip ci]" | |
| git push | |
| - name: Upload benchmark report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: benchmark-report | |
| path: | | |
| .bench/report.html | |
| .bench/*.json |