🤖 update test matrix in CI #1038
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: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| release: | |
| types: | |
| - created | |
| # Sequence of patterns matched against refs/tags | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| UV_SYSTEM_PYTHON: "1" | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| # Set job outputs to values from filter step | |
| outputs: | |
| src: ${{ steps.filter.outputs.src }} | |
| docs: ${{ steps.filter.outputs.docs }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| src: | |
| - .github/workflows/CI.yml | |
| - 'src/dagster_ray/**' | |
| - 'tests/**' | |
| - 'examples/**' | |
| - pyproject.toml | |
| - uv.lock | |
| - .pre-commit-config.yaml | |
| - Dockerfile | |
| - .dockerignore | |
| docs: | |
| - .github/workflows/CI.yml | |
| - 'docs/**' | |
| - mkdocs.yml | |
| - 'src/dagster_ray/**' | |
| - pyproject.toml | |
| - uv.lock | |
| test: | |
| name: Test Python ${{ matrix.py }} - Ray ${{ matrix.ray }} - Dagster ${{ matrix.dagster }} - KubeRay ${{ matrix.kuberay }} | |
| runs-on: ${{ matrix.os }}-latest | |
| needs: changes | |
| if: ${{ needs.changes.outputs.src == 'true' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - Ubuntu | |
| py: | |
| - "3.12" | |
| - "3.11" | |
| - "3.10" | |
| ray: | |
| - "2.49.2" | |
| - "2.46.0" | |
| dagster: | |
| - "1.11.13" | |
| - "1.11.6" | |
| - "1.11.1" | |
| - "1.10.21" | |
| kuberay: | |
| - "1.4.0" | |
| - "1.3.0" | |
| - "1.2.2" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: azure/[email protected] | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Start minikube | |
| uses: medyagh/setup-minikube@master | |
| with: | |
| start: false | |
| driver: docker | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: 0.8.12 | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.py }} | |
| run: uv python install ${{ matrix.py }} && uv python pin ${{ matrix.py }} && uv venv --python ${{ matrix.py }} | |
| - name: Override ray==${{ matrix.ray }} dagster==${{ matrix.dagster }} | |
| id: override | |
| run: (python scripts/check_deps.py --python ${{ matrix.py }} --dagster ${{ matrix.dagster }} --ray ${{ matrix.ray }} && uv add --no-sync "ray[all]==${{ matrix.ray }}" "dagster==${{ matrix.dagster }}") || echo SKIP=1 >> $GITHUB_OUTPUT | |
| - name: Install dependencies | |
| run: uv sync --all-extras --dev | |
| if: ${{ steps.override.outputs.SKIP != '1' }} | |
| - name: Run tests | |
| env: | |
| PYTEST_KUBERAY_VERSIONS: "${{ matrix.kuberay }}" | |
| run: uv run pytest -v . | |
| if: ${{ steps.override.outputs.SKIP != '1' }} | |
| lint: | |
| name: Lint ${{ matrix.py }} | |
| runs-on: ${{ matrix.os }}-latest | |
| needs: changes | |
| if: ${{ needs.changes.outputs.src == 'true' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - Ubuntu | |
| py: | |
| - "3.10" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: 0.8.12 | |
| enable-cache: true | |
| - name: Run pre-commit hooks | |
| run: SKIP=basedpyright uv run --with pre-commit --with ruff pre-commit run --all-files | |
| typecheck: | |
| name: Typecheck ${{ matrix.py }} | |
| runs-on: ${{ matrix.os }}-latest | |
| needs: changes | |
| if: ${{ needs.changes.outputs.src == 'true' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - Ubuntu | |
| py: | |
| - "3.10" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: 0.8.12 | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.py }} | |
| run: uv python install ${{ matrix.py }} && uv python pin ${{ matrix.py }} | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: BasedPyright | |
| run: uv run basedpyright --level error | |
| build-docs: | |
| name: Build Docs | |
| runs-on: Ubuntu-latest | |
| needs: changes | |
| if: ${{ needs.changes.outputs.docs == 'true' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: 0.8.12 | |
| enable-cache: true | |
| - name: Set up Python 3.10 | |
| run: uv python install 3.10 && uv python pin 3.10 | |
| - name: Build Docs | |
| run: uv run --group docs mkdocs build --strict --clean | |
| qa_success: | |
| name: QA Success | |
| if: always() | |
| needs: | |
| - test | |
| - lint | |
| - typecheck | |
| - build-docs | |
| runs-on: Ubuntu-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| allowed-failures: "" | |
| allowed-skips: lint, test, typecheck, build-docs | |
| jobs: ${{ toJSON(needs) }} |