Merge pull request #38 from getyourguide/dependabot/uv/ruff-0.14.8 #165
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: | |
| workflow_dispatch: # Allow manual triggering | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }} | |
| cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| fail-fast: false # Don't cancel other jobs if one fails | |
| name: Test (Python ${{ matrix.python-version }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python and UV | |
| uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --group dev | |
| - name: Run sanity check | |
| run: | | |
| uv run python scripts/sanity_checks.py | |
| - name: Run tests | |
| run: | | |
| uv run pytest tests/ -n auto --tb=line --cov=dataframe_expectations | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTHON_VERSION: "3.11" # Use a single version for linting | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python and UV | |
| uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --group dev | |
| - name: Pre-commit | |
| run: | | |
| uv run pre-commit run --all-files --show-diff-on-failure | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTHON_VERSION: "3.11" # Use a single version for docs | |
| needs: [test, lint] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python and UV | |
| uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --group docs | |
| - name: Build docs | |
| run: | | |
| uv run sphinx-build source build/html | |
| touch build/html/.nojekyll | |
| working-directory: docs | |
| - name: Upload artifact | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./docs/build/html | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/main' | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |