<commit_before>name: Tests

on:
  push:
  pull_request:
  schedule:
    - cron: "0 6,18 * * *"

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    # Do not run the schedule job on forks
    if: github.repository == 'dask/distributed' || github.event_name != 'schedule'
    runs-on: ${{ matrix.os }}
    timeout-minutes: 120

    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ["3.8", "3.9", "3.10"]
        queuing: [no_queue]
        # Cherry-pick test modules to split the overall runtime roughly in half
        partition: [ci1, not ci1]
        exclude:
          - os: macos-latest
            python-version: 3.9
        include:
          - os: ubuntu-latest
            python-version: 3.9
            queuing: queue
            partition: "ci1"
          - os: ubuntu-latest
            python-version: 3.9
            queuing: queue
            partition: "not ci1"

        # Uncomment to stress-test the test suite for random failures.
        # Must also change `export TEST_ID` in first step below.
        # This will take a LONG time and delay all PRs across the whole github.com/dask!
        # To avoid hamstringing other people, change 'on: [push, pull_request]' above
        # to just 'on: [push]'; this way the stress test will run exclusively in your
        # branch (https://github.com/<your name>/distributed/actions).
        # run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

    env:
      CONDA_FILE: continuous_integration/environment-${{ matrix.python-version }}.yaml

    steps:
      - name: Set $TEST_ID
        run: |
          export PARTITION_LABEL=$( echo "${{ matrix.partition }}" | sed "s/ //" )
          export TEST_ID="${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.queuing }}-$PARTITION_LABEL"
          # Switch to this version for stress-test:
          # export TEST_ID="${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.queuing }}-$PARTITION_LABEL-${{ matrix.run }}"
          echo "TEST_ID: $TEST_ID"
          echo "TEST_ID=$TEST_ID" >> $GITHUB_ENV
        shell: bash

      - name: Checkout source
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Setup Conda Environment
        uses: conda-incubator/setup-miniconda@v2
        with:
          miniforge-variant: Mambaforge
          miniforge-version: latest
          condarc-file: continuous_integration/condarc
          use-mamba: true
          activate-environment: dask-distributed

      - name: Show conda options
        shell: bash -l {0}
        run: conda config --show

      - name: Check if caching is enabled
        uses: xarray-contrib/ci-trigger@v1.1
        id: skip-caching
        with:
          keyword: "[skip-caching]"

      - name: Get Date
        if: steps.skip-caching.outputs.trigger-found != 'true'
        id: get-date
        run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
        shell: bash

      - name: Cache Conda env
        if: steps.skip-caching.outputs.trigger-found != 'true'
        uses: actions/cache@v2
        with:
          path: ${{ env.CONDA }}/envs
          key: conda-${{ matrix.os }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
        env:
          # Increase this value to reset cache if continuous_integration/environment-${{ matrix.python-version }}.yaml has not changed
          CACHE_NUMBER: 0
        id: cache

      - name: Update environment
        run: mamba env update -n dask-distributed -f ${{ env.CONDA_FILE }}
        if: steps.skip-caching.outputs.trigger-found == 'true' || steps.cache.outputs.cache-hit != 'true'<commit_msg>Bump actions/cache from 2 to 3 (#7118)<commit_after>name: Tests

on:
  push:
  pull_request:
  schedule:
    - cron: "0 6,18 * * *"

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    # Do not run the schedule job on forks
    if: github.repository == 'dask/distributed' || github.event_name != 'schedule'
    runs-on: ${{ matrix.os }}
    timeout-minutes: 120

    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ["3.8", "3.9", "3.10"]
        queuing: [no_queue]
        # Cherry-pick test modules to split the overall runtime roughly in half
        partition: [ci1, not ci1]
        exclude:
          - os: macos-latest
            python-version: 3.9
        include:
          - os: ubuntu-latest
            python-version: 3.9
            queuing: queue
            partition: "ci1"
          - os: ubuntu-latest
            python-version: 3.9
            queuing: queue
            partition: "not ci1"

        # Uncomment to stress-test the test suite for random failures.
        # Must also change `export TEST_ID` in first step below.
        # This will take a LONG time and delay all PRs across the whole github.com/dask!
        # To avoid hamstringing other people, change 'on: [push, pull_request]' above
        # to just 'on: [push]'; this way the stress test will run exclusively in your
        # branch (https://github.com/<your name>/distributed/actions).
        # run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

    env:
      CONDA_FILE: continuous_integration/environment-${{ matrix.python-version }}.yaml

    steps:
      - name: Set $TEST_ID
        run: |
          export PARTITION_LABEL=$( echo "${{ matrix.partition }}" | sed "s/ //" )
          export TEST_ID="${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.queuing }}-$PARTITION_LABEL"
          # Switch to this version for stress-test:
          # export TEST_ID="${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.queuing }}-$PARTITION_LABEL-${{ matrix.run }}"
          echo "TEST_ID: $TEST_ID"
          echo "TEST_ID=$TEST_ID" >> $GITHUB_ENV
        shell: bash

      - name: Checkout source
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Setup Conda Environment
        uses: conda-incubator/setup-miniconda@v2
        with:
          miniforge-variant: Mambaforge
          miniforge-version: latest
          condarc-file: continuous_integration/condarc
          use-mamba: true
          activate-environment: dask-distributed

      - name: Show conda options
        shell: bash -l {0}
        run: conda config --show

      - name: Check if caching is enabled
        uses: xarray-contrib/ci-trigger@v1.1
        id: skip-caching
        with:
          keyword: "[skip-caching]"

      - name: Get Date
        if: steps.skip-caching.outputs.trigger-found != 'true'
        id: get-date
        run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
        shell: bash

      - name: Cache Conda env
        if: steps.skip-caching.outputs.trigger-found != 'true'
        uses: actions/cache@v3
        with:
          path: ${{ env.CONDA }}/envs
          key: conda-${{ matrix.os }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
        env:
          # Increase this value to reset cache if continuous_integration/environment-${{ matrix.python-version }}.yaml has not changed
          CACHE_NUMBER: 0
        id: cache

      - name: Update environment
        run: mamba env update -n dask-distributed -f ${{ env.CONDA_FILE }}
        if: steps.skip-caching.outputs.trigger-found == 'true' || steps.cache.outputs.cache-hit != 'true'
{'fraction_non_alphanumeric': 0.12556053811659193, 'fraction_numerical': 0.016912235746316465, 'mean_word_length': 2.1274038461538463, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3488235', 'n_tokens_mistral': 2542, 'n_tokens_neox': 2337, 'n_words': 693}