diff --git a/.github/workflows/test-report.yaml b/.github/workflows/test-report.yaml index 6b9f14ded7..09e645a072 100644 --- a/.github/workflows/test-report.yaml +++ b/.github/workflows/test-report.yaml @@ -25,15 +25,14 @@ jobs: with: miniforge-version: latest condarc-file: continuous_integration/condarc - use-mamba: true environment-file: continuous_integration/scripts/test-report-environment.yml activate-environment: dask-distributed - name: Show conda options run: conda config --show - - name: mamba list - run: mamba list + - name: conda list + run: conda list - uses: actions/cache@v5 id: cache diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 886cf69ffe..866d75858a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -53,41 +53,42 @@ jobs: - os: ubuntu-latest environment: "3.10" label: no_queue - partition: "ci1" + partition: ci1 - os: ubuntu-latest environment: "3.10" label: no_queue - partition: "not ci1" + partition: not ci1 # dask.array P2P shuffle - os: ubuntu-latest environment: mindeps label: numpy extra_packages: [numpy=1.24] - partition: "ci1" + partition: ci1 - os: ubuntu-latest environment: mindeps label: numpy extra_packages: [numpy=1.24] - partition: "not ci1" + partition: not ci1 # dask.dataframe P2P shuffle - os: ubuntu-latest environment: mindeps label: pandas extra_packages: [numpy=1.24, pandas=2.0, pyarrow=16.0] - partition: "ci1" + partition: ci1 - os: ubuntu-latest environment: mindeps label: pandas extra_packages: [numpy=1.24, pandas=2.0, pyarrow=16.0] - partition: "not ci1" + partition: not ci1 - os: ubuntu-latest - environment: mindeps + # Don't disturb the various GPU-only deps in the 3.10 environment + environment: "3.11" label: memray - extra_packages: [memray] - partition: "extra_packages" + extra_packages: [memray] # Not available on Windows + partition: memray # Uncomment to stress-test the test suite for random failures. # Must also change `export TEST_ID` in first step below. @@ -121,7 +122,6 @@ jobs: with: miniforge-version: latest condarc-file: continuous_integration/condarc - use-mamba: true activate-environment: dask-distributed - name: Show conda options @@ -150,7 +150,7 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.CONDA }}/envs - key: conda-${{ matrix.os }}-${{ matrix.environment }}-${{ matrix.label }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }} + key: conda-${{ matrix.os }}-${{ matrix.environment }}-${{ matrix.label }}-${{ matrix.extra_packages }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }} env: # Increase this value to reset cache if # continuous_integration/environment-${{ matrix.environment }}.yaml has not @@ -159,7 +159,7 @@ jobs: id: cache - name: Update environment - run: mamba env update -n dask-distributed -f ${{ env.CONDA_FILE }} + run: conda env update -n dask-distributed -f ${{ env.CONDA_FILE }} if: | ( steps.skip-caching.outputs.trigger-found == 'true' @@ -168,25 +168,32 @@ jobs: || steps.cache.outputs.cache-hit != 'true' ) + - name: Extra Installs + if: | + matrix.extra_packages + && ( + steps.skip-caching.outputs.trigger-found == 'true' + || (github.event_name == 'pull_request' + && contains(github.event.pull_request.labels.*.name, 'skip-caching')) + || steps.cache.outputs.cache-hit != 'true' + ) + shell: bash -l {0} + run: conda install -y ${{ join(matrix.extra_packages, ' ') }} + - name: Install shell: bash -l {0} run: | python -m pip install --no-deps -e . - - name: Extra Installs - if: ${{ matrix.extra_packages }} - shell: bash -l {0} - run: mamba install -y ${{ join(matrix.extra_packages, ' ') }} - - - name: mamba list + - name: conda list shell: bash -l {0} - run: mamba list + run: conda list - - name: mamba env export + - name: conda env export shell: bash -l {0} run: | - echo -e "--\n--Conda Environment (re-create this with \`mamba env create --name -f \`)\n--" - mamba env export | grep -E -v '^prefix:.*$' + echo -e "--\n--Conda Environment (re-create this with \`conda env create --name -f \`)\n--" + conda env export | grep -E -v '^prefix:.*$' - name: Setup SSH shell: bash -l {0} diff --git a/distributed/diagnostics/tests/test_memray.py b/distributed/diagnostics/tests/test_memray.py index 05c9576254..b7de905181 100644 --- a/distributed/diagnostics/tests/test_memray.py +++ b/distributed/diagnostics/tests/test_memray.py @@ -4,7 +4,7 @@ memray = pytest.importorskip("memray") -pytestmark = pytest.mark.extra_packages +pytestmark = pytest.mark.memray from distributed import Client, LocalCluster from distributed.diagnostics.memray import memray_scheduler, memray_workers diff --git a/pyproject.toml b/pyproject.toml index b07c4e54d0..7070490d7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -184,12 +184,12 @@ filterwarnings = [ minversion = "6" markers = [ "ci1: marks tests as belonging to 1 out of 2 partitions to run on CI ('-m \"not ci1\"' for second partition)", - "extra_packages: marks tests that require a special dependency to run.", - "slow: marks tests as slow (deselected by default", # select with '--runslow') + "memray: marks tests that require memray to run (available on Linux/MacOS only)", + "slow: marks tests as slow (deselected by default; select with '--runslow')", "avoid_ci: marks tests as flaky or broken on CI on all OSs", "ipython: marks tests as exercising IPython", "gpu: marks tests we want to run on GPUs", - "leaking: ignore leaked resources", # see pytest_resourceleaks.py for usage + "leaking: ignore leaked resources", # see pytest_resourceleaks.py for usage "workerstate: deterministic test for the worker state machine. Automatically applied to all tests that use the 'ws' fixture.", ] # pytest-timeout settings