From 9ff0b5b836f5c31b981f4ac993ea4a6451a61f1a Mon Sep 17 00:00:00 2001 From: crusaderky Date: Thu, 25 Jan 2024 15:18:14 +0000 Subject: [PATCH 1/3] Split out dask tests in CI --- .github/workflows/dask_test.yaml | 57 ++++++++++++++++++++++++++++++++ .github/workflows/pre-commit.yml | 4 +-- .github/workflows/test.yaml | 7 ++-- 3 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/dask_test.yaml diff --git a/.github/workflows/dask_test.yaml b/.github/workflows/dask_test.yaml new file mode 100644 index 000000000..46f444d5a --- /dev/null +++ b/.github/workflows/dask_test.yaml @@ -0,0 +1,57 @@ +name: dask/dask tests + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +# When this workflow is queued, automatically cancel any previous running +# or pending jobs from the same branch +concurrency: + group: dask_test-${{ github.ref }} + cancel-in-progress: true + +# Required shell entrypoint to have properly activated conda environments +defaults: + run: + shell: bash -l {0} + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + environment-file: [ci/environment.yml] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Needed by codecov.io + + - name: Get current date + id: date + run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" + + - name: Install Environment + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: ${{ matrix.environment-file }} + create-args: python=${{ matrix.python-version }} + # Wipe cache every 24 hours or whenever environment.yml changes. This means it + # may take up to a day before changes to unpinned packages are picked up. + # To force a cache refresh, change the hardcoded numerical suffix below. + cache-environment-key: environment-${{ steps.date.outputs.date }}-0 + + - name: Install dask-expr + run: python -m pip install -e . --no-deps + + - name: Print dask versions + # Output of `micromamba list` is buggy for pip-installed packages + run: pip list | grep -E 'dask|distributed' + + - name: Run Dask DataFrame tests + run: python -c "import dask.dataframe as dd; dd.test_dataframe()" diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 829cdcfe0..667ee6242 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,8 +11,8 @@ jobs: name: pre-commit hooks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.2 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.9' - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 123d94543..55cb0bd88 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ on: # When this workflow is queued, automatically cancel any previous running # or pending jobs from the same branch concurrency: - group: ${{ github.ref }} + group: test-${{ github.ref }} cancel-in-progress: true # Required shell entrypoint to have properly activated conda environments @@ -28,7 +28,7 @@ jobs: environment-file: [ci/environment.yml] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Needed by codecov.io @@ -56,8 +56,5 @@ jobs: - name: Run tests run: py.test -n auto --verbose --cov=dask_expr --cov-report=xml - - name: Run Dask DataFrame tests - run: python -c "import dask.dataframe as dd; dd.test_dataframe()" - - name: Coverage uses: codecov/codecov-action@v3 From 329d6192699bdecba571ad73d5fd98a5182d9e5c Mon Sep 17 00:00:00 2001 From: crusaderky Date: Thu, 25 Jan 2024 15:25:13 +0000 Subject: [PATCH 2/3] Skip intermediate python versions --- .github/workflows/dask_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dask_test.yaml b/.github/workflows/dask_test.yaml index 46f444d5a..f836bdf78 100644 --- a/.github/workflows/dask_test.yaml +++ b/.github/workflows/dask_test.yaml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.12"] environment-file: [ci/environment.yml] steps: From a3e27af66afd104f0129f9cf4f4ed7e41cae974f Mon Sep 17 00:00:00 2001 From: crusaderky Date: Thu, 25 Jan 2024 18:12:21 +0000 Subject: [PATCH 3/3] Update .github/workflows/dask_test.yaml Co-authored-by: Hendrik Makait --- .github/workflows/dask_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dask_test.yaml b/.github/workflows/dask_test.yaml index f836bdf78..641c65077 100644 --- a/.github/workflows/dask_test.yaml +++ b/.github/workflows/dask_test.yaml @@ -1,4 +1,4 @@ -name: dask/dask tests +name: Tests / dask/dask on: push: