From 64891abe10e6bfd0baf59db3b4d510750f5c1ec7 Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Fri, 14 Jun 2024 15:29:55 +0200 Subject: [PATCH] Add python-filter Signed-off-by: Anatoly Myachev --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27444ad7501..47baecaa2fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,9 @@ on: - setup.py - versioneer.py push: + schedule: + - cron: "30 2 * * WED" + - cron: "30 2 * * FRI" concurrency: # Cancel other jobs in the same branch. We don't care whether CI passes # on old commits. @@ -26,6 +29,23 @@ env: MODIN_GITHUB_CI: true jobs: + python-filter: + runs-on: ubuntu-latest + outputs: + python-version: ${{ steps.choose.outputs.python-version }} + steps: + - id: choose + run: | + if [[ ${{ github.event.schedule }} = "30 2 * * WED" ]] + then + echo "python-version=3.10" >> "$GITHUB_OUTPUT" + elif [[ ${{ github.event.schedule }} = "30 2 * * FRI" ]] + then + echo "python-version=3.11" >> "$GITHUB_OUTPUT" + else + echo "python-version=3.9" >> "$GITHUB_OUTPUT" + fi + lint-mypy: name: lint (mypy) runs-on: ubuntu-latest @@ -120,7 +140,7 @@ jobs: - uses: ./.github/actions/upload-coverage test-defaults: - needs: [lint-flake8] + needs: [lint-flake8, python-filter] runs-on: ubuntu-latest defaults: run: @@ -130,7 +150,7 @@ jobs: execution: [BaseOnPython] env: MODIN_TEST_DATASET_SIZE: "small" - name: Test ${{ matrix.execution }} execution, Python 3.10 + name: Test ${{ matrix.execution }} execution, Python ${{ needs.python-filter.outputs.python-version }}" steps: - uses: actions/checkout@v4 - uses: ./.github/actions/mamba-env @@ -240,7 +260,7 @@ jobs: "${{ steps.filter.outputs.ray }}" "${{ steps.filter.outputs.dask }}" >> $GITHUB_OUTPUT test-all-unidist: - needs: [lint-flake8, execution-filter] + needs: [lint-flake8, execution-filter, python-filter] if: github.event_name == 'push' || needs.execution-filter.outputs.unidist == 'true' runs-on: ubuntu-latest defaults: @@ -248,7 +268,7 @@ jobs: shell: bash -l {0} strategy: matrix: - python-version: ["3.10"] + python-version: [ "${{ needs.python-filter.outputs.python-version }}" ] unidist-backend: ["mpi"] env: MODIN_ENGINE: "Unidist" @@ -314,13 +334,13 @@ jobs: - uses: ./.github/actions/upload-coverage test-all: - needs: [lint-flake8, execution-filter] + needs: [lint-flake8, execution-filter, python-filter] strategy: matrix: os: - ubuntu - windows - python-version: ["3.10"] + python-version: ["${{ needs.python-filter.outputs.python-version }}"] engine: ${{ fromJSON( github.event_name == 'push' && '["python", "ray", "dask"]' || needs.execution-filter.outputs.engines ) }} test_task: - group_1 @@ -446,14 +466,14 @@ jobs: if: matrix.os == 'windows' test-sanity: - needs: [lint-flake8, execution-filter] + needs: [lint-flake8, execution-filter, python-filter] if: github.event_name == 'pull_request' strategy: matrix: os: - ubuntu - windows - python-version: ["3.10"] + python-version: ["${{ needs.python-filter.outputs.python-version }}"] execution: - name: ray shell-ex: "python -m pytest" @@ -610,14 +630,14 @@ jobs: - uses: ./.github/actions/upload-coverage test-spreadsheet: - needs: [lint-flake8] + needs: [lint-flake8, python-filter] runs-on: ubuntu-latest defaults: run: shell: bash -l {0} strategy: matrix: - python-version: ["3.10"] + python-version: ["${{ needs.python-filter.outputs.python-version }}"] engine: ["ray", "dask"] env: MODIN_EXPERIMENTAL: "True"