From 90adfe12d86593c5358e71c1f348598b749e36fa Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 19:51:19 -0600 Subject: [PATCH 01/16] Add xarray groupby test --- .github/workflows/ci.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8813e4da4..36adfc4cb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -97,3 +97,42 @@ jobs: shell: bash -l {0} run: | pytest -n 2 + +xarray-groupby: + name: xarray-groupby + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: 'pydata/xarray' + fetch-depth: 0 # Fetch all history for all branches and tags. + - name: Set up conda environment + uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41 + with: + environment-file: ci/requirements/environment.yml + environment-name: xarray-tests + extra-specs: | + python=${{ matrix.python-version }} + - name: Install upstream flox + run: | + python -m pip install --no-deps + - name: Install xarray + run: | + python -m pip install --no-deps git+https://github.com/dcherian/flox.git@{{ github.ref_name }} + - name: Version info + run: | + conda info -a + conda list + python xarray/util/print_versions.py + - name: import xarray + run: | + python -c 'import xarray' + - name: import flox + run: | + python -c 'import flox' + - name: Run Tests + if: success() + id: status + run: | + set -euo pipefail + python -m pytest -n auto xarray/tests/test_groupby.py From c7edf749fe3edb217186f818bd7ef2b0fbb42e3c Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:29:08 -0600 Subject: [PATCH 02/16] syntax --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 36adfc4cb..9f8d581c8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -98,7 +98,7 @@ jobs: run: | pytest -n 2 -xarray-groupby: + xarray-groupby: name: xarray-groupby runs-on: ubuntu-latest steps: From 3c37a5c0f0966c984fd24723b0f3637d22cdf9e3 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:33:24 -0600 Subject: [PATCH 03/16] fix install --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9f8d581c8..96c7d9231 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -118,7 +118,8 @@ jobs: python -m pip install --no-deps - name: Install xarray run: | - python -m pip install --no-deps git+https://github.com/dcherian/flox.git@{{ github.ref_name }} + python -m pip install --no-deps \ + git+https://github.com/dcherian/flox.git@{{ github.ref_name }} - name: Version info run: | conda info -a From a86fcd45aa55f05d6427ab9fa8534f2774809048 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:34:11 -0600 Subject: [PATCH 04/16] to-revert --- .github/workflows/ci-additional.yaml | 105 --------------------------- .github/workflows/ci.yaml | 46 ++++++------ 2 files changed, 23 insertions(+), 128 deletions(-) delete mode 100644 .github/workflows/ci-additional.yaml diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml deleted file mode 100644 index a4dc9024b..000000000 --- a/.github/workflows/ci-additional.yaml +++ /dev/null @@ -1,105 +0,0 @@ -name: CI Additional -on: - push: - branches: - - "main" - pull_request: - branches: - - "*" - schedule: - - cron: "0 0 * * *" # Daily “At 00:00” - workflow_dispatch: # allows you to trigger manually - -jobs: - detect-ci-trigger: - name: detect ci trigger - runs-on: ubuntu-latest - if: | - github.repository == 'dcherian/flox' - && (github.event_name == 'push' || github.event_name == 'pull_request') - outputs: - triggered: ${{ steps.detect-trigger.outputs.trigger-found }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - uses: xarray-contrib/ci-trigger@v1.1 - id: detect-trigger - with: - keyword: "[skip-ci]" - - test: - name: ${{ matrix.os }} ${{ matrix.env }} - runs-on: ${{ matrix.os }} - needs: detect-ci-trigger - if: needs.detect-ci-trigger.outputs.triggered == 'false' - defaults: - run: - shell: bash -l {0} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest"] - env: - [ - "no-xarray", - "no-dask", - "minimal-requirements", - ] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Fetch all history for all branches and tags. - - - name: Set environment variables - run: | - echo "CONDA_ENV_FILE=ci/${{ matrix.env }}.yml" >> $GITHUB_ENV - - - name: Cache conda - uses: actions/cache@v3 - with: - path: ~/conda_pkgs_dir - key: - ${{ runner.os }}-conda-${{ matrix.env }}-${{ - hashFiles('ci/**.yml') }} - - - uses: conda-incubator/setup-miniconda@v2 - with: - channels: conda-forge - channel-priority: strict - mamba-version: "*" - activate-environment: flox-tests - auto-update-conda: false - python-version: 3.9 - use-only-tar-bz2: true - - - name: Install conda dependencies - run: | - mamba env update -f $CONDA_ENV_FILE - - - name: Install flox - run: | - python -m pip install --no-deps -e . - - - name: Version info - run: | - conda info -a - conda list - - name: Import flox - run: | - python -c "import flox" - - name: Run tests - run: | - python -m pytest \ - -n auto \ - --cov=flox \ - --cov-report=xml - - - name: Upload code coverage to Codecov - uses: codecov/codecov-action@v3.1.0 - with: - file: ./coverage.xml - flags: unittests,${{ matrix.env }} - env_vars: RUNNER_OS - name: codecov-umbrella - fail_ci_if_error: false diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 96c7d9231..6d6cbecc7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.8", "3.10"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 with: @@ -75,28 +75,28 @@ jobs: name: codecov-umbrella fail_ci_if_error: false - upstream-dev: - name: upstream-dev - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v2 - with: - channels: conda-forge - mamba-version: "*" - activate-environment: flox-tests - auto-update-conda: false - python-version: '3.10' - - name: Set up conda environment - shell: bash -l {0} - run: | - mamba env update -f ci/upstream-dev-env.yml - python -m pip install -e . - conda list - - name: Run Tests - shell: bash -l {0} - run: | - pytest -n 2 + # upstream-dev: + # name: upstream-dev + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - uses: conda-incubator/setup-miniconda@v2 + # with: + # channels: conda-forge + # mamba-version: "*" + # activate-environment: flox-tests + # auto-update-conda: false + # python-version: '3.10' + # - name: Set up conda environment + # shell: bash -l {0} + # run: | + # mamba env update -f ci/upstream-dev-env.yml + # python -m pip install -e . + # conda list + # - name: Run Tests + # shell: bash -l {0} + # run: | + # pytest -n 2 xarray-groupby: name: xarray-groupby From 5ad2ecd8708a624bb94c58e088d443bc42460972 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:39:29 -0600 Subject: [PATCH 05/16] fix --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6d6cbecc7..4ac33d3b7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -113,10 +113,10 @@ jobs: environment-name: xarray-tests extra-specs: | python=${{ matrix.python-version }} - - name: Install upstream flox - run: | - python -m pip install --no-deps - name: Install xarray + run: | + python -m pip install --no-deps . + - name: Install upstream flox run: | python -m pip install --no-deps \ git+https://github.com/dcherian/flox.git@{{ github.ref_name }} From e4f4297dd48dfa1a13a7e0b0a20c70b93315031c Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:42:31 -0600 Subject: [PATCH 06/16] also revert --- .github/workflows/ci.yaml | 110 +++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4ac33d3b7..c46ff2c93 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,65 +15,65 @@ concurrency: cancel-in-progress: true jobs: - build: - name: Build (${{ matrix.python-version }}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - defaults: - run: - shell: bash -l {0} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest"] - python-version: ["3.10"] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Fetch all history for all branches and tags. - - name: Set environment variables - run: | - echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV - echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV - - name: Cache conda - uses: actions/cache@v3 - with: - path: ~/conda_pkgs_dir - key: - ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ - hashFiles('ci/**.yml') }} - - uses: conda-incubator/setup-miniconda@v2 - with: - channels: conda-forge - channel-priority: strict - mamba-version: "*" - activate-environment: flox-tests - auto-update-conda: false - python-version: ${{ matrix.python-version }} - use-only-tar-bz2: true + # build: + # name: Build (${{ matrix.python-version }}, ${{ matrix.os }}) + # runs-on: ${{ matrix.os }} + # defaults: + # run: + # shell: bash -l {0} + # strategy: + # fail-fast: false + # matrix: + # os: ["ubuntu-latest"] + # python-version: ["3.10"] + # steps: + # - uses: actions/checkout@v3 + # with: + # fetch-depth: 0 # Fetch all history for all branches and tags. + # - name: Set environment variables + # run: | + # echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV + # echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV + # - name: Cache conda + # uses: actions/cache@v3 + # with: + # path: ~/conda_pkgs_dir + # key: + # ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ + # hashFiles('ci/**.yml') }} + # - uses: conda-incubator/setup-miniconda@v2 + # with: + # channels: conda-forge + # channel-priority: strict + # mamba-version: "*" + # activate-environment: flox-tests + # auto-update-conda: false + # python-version: ${{ matrix.python-version }} + # use-only-tar-bz2: true - - name: Install conda dependencies - run: | - mamba env update -f $CONDA_ENV_FILE + # - name: Install conda dependencies + # run: | + # mamba env update -f $CONDA_ENV_FILE - - name: Set up conda environment - shell: bash -l {0} - run: | - python -m pip install -e . - conda list + # - name: Set up conda environment + # shell: bash -l {0} + # run: | + # python -m pip install -e . + # conda list - - name: Run Tests - shell: bash -l {0} - run: | - pytest -n auto --cov=./ --cov-report=xml + # - name: Run Tests + # shell: bash -l {0} + # run: | + # pytest -n auto --cov=./ --cov-report=xml - - name: Upload code coverage to Codecov - uses: codecov/codecov-action@v3.1.0 - with: - file: ./coverage.xml - flags: unittests - env_vars: RUNNER_OS,PYTHON_VERSION - name: codecov-umbrella - fail_ci_if_error: false + # - name: Upload code coverage to Codecov + # uses: codecov/codecov-action@v3.1.0 + # with: + # file: ./coverage.xml + # flags: unittests + # env_vars: RUNNER_OS,PYTHON_VERSION + # name: codecov-umbrella + # fail_ci_if_error: false # upstream-dev: # name: upstream-dev From 2f455b7a977f51ecc88182725414cd9419705028 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:42:40 -0600 Subject: [PATCH 07/16] fix install --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c46ff2c93..2151794ae 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -119,7 +119,7 @@ jobs: - name: Install upstream flox run: | python -m pip install --no-deps \ - git+https://github.com/dcherian/flox.git@{{ github.ref_name }} + git+https://github.com/dcherian/flox.git@${{ github.ref_name }} - name: Version info run: | conda info -a From e9b8252129f3e0edc4f499d74501ead7b6bd23c6 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:48:06 -0600 Subject: [PATCH 08/16] ref instead of ref_nae --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2151794ae..d7cbae82d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -119,7 +119,7 @@ jobs: - name: Install upstream flox run: | python -m pip install --no-deps \ - git+https://github.com/dcherian/flox.git@${{ github.ref_name }} + git+https://github.com/dcherian/flox.git@${{ github.ref }} - name: Version info run: | conda info -a From e18ba3dc7fdf4633d4ff3f5a27815e69424de3ec Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 20:57:35 -0600 Subject: [PATCH 09/16] activate env --- .github/workflows/ci.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d7cbae82d..28fa5ae84 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -106,13 +106,16 @@ jobs: with: repository: 'pydata/xarray' fetch-depth: 0 # Fetch all history for all branches and tags. - - name: Set up conda environment - uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41 + - uses: conda-incubator/setup-miniconda@v2 with: - environment-file: ci/requirements/environment.yml - environment-name: xarray-tests - extra-specs: | - python=${{ matrix.python-version }} + channels: conda-forge + channel-priority: strict + mamba-version: "*" + activate-environment: xarray-tests + auto-update-conda: false + python-version: "3.10" + use-only-tar-bz2: true + - name: Install xarray run: | python -m pip install --no-deps . From eb99ce3e67315991325ea67008f16d00c6a1f8b5 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 21:01:20 -0600 Subject: [PATCH 10/16] Revert "activate env" This reverts commit e18ba3dc7fdf4633d4ff3f5a27815e69424de3ec. --- .github/workflows/ci.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 28fa5ae84..d7cbae82d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -106,16 +106,13 @@ jobs: with: repository: 'pydata/xarray' fetch-depth: 0 # Fetch all history for all branches and tags. - - uses: conda-incubator/setup-miniconda@v2 + - name: Set up conda environment + uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41 with: - channels: conda-forge - channel-priority: strict - mamba-version: "*" - activate-environment: xarray-tests - auto-update-conda: false - python-version: "3.10" - use-only-tar-bz2: true - + environment-file: ci/requirements/environment.yml + environment-name: xarray-tests + extra-specs: | + python=${{ matrix.python-version }} - name: Install xarray run: | python -m pip install --no-deps . From 9ed28ddb1213e4fbff2a6d4c0f675f432ae6ae35 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 21:01:46 -0600 Subject: [PATCH 11/16] activate --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d7cbae82d..cedd474ac 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -122,6 +122,7 @@ jobs: git+https://github.com/dcherian/flox.git@${{ github.ref }} - name: Version info run: | + conda activate xarray-tests conda info -a conda list python xarray/util/print_versions.py From e5abab7d65fcf297d3052e02bea59d2e40c08bd0 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 21:11:14 -0600 Subject: [PATCH 12/16] activate again --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cedd474ac..8d394177f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -112,7 +112,7 @@ jobs: environment-file: ci/requirements/environment.yml environment-name: xarray-tests extra-specs: | - python=${{ matrix.python-version }} + python="3.10" - name: Install xarray run: | python -m pip install --no-deps . @@ -122,7 +122,7 @@ jobs: git+https://github.com/dcherian/flox.git@${{ github.ref }} - name: Version info run: | - conda activate xarray-tests + micromamba activate xarray-tests conda info -a conda list python xarray/util/print_versions.py From e210de5827840e55e8560653b194b972bb875399 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 21:16:05 -0600 Subject: [PATCH 13/16] change shell --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8d394177f..cb2df290b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -121,6 +121,7 @@ jobs: python -m pip install --no-deps \ git+https://github.com/dcherian/flox.git@${{ github.ref }} - name: Version info + shell: bash -l {0} run: | micromamba activate xarray-tests conda info -a From d03d3d47c4b13c689bf0c7b14650463a1f0ed0a0 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 21:19:21 -0600 Subject: [PATCH 14/16] try again --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb2df290b..c26433822 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -101,6 +101,9 @@ jobs: xarray-groupby: name: xarray-groupby runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} steps: - uses: actions/checkout@v3 with: @@ -121,9 +124,7 @@ jobs: python -m pip install --no-deps \ git+https://github.com/dcherian/flox.git@${{ github.ref }} - name: Version info - shell: bash -l {0} run: | - micromamba activate xarray-tests conda info -a conda list python xarray/util/print_versions.py From 44f9f91dbcd2806eec2a0ad3c596310dc544e819 Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 21:22:06 -0600 Subject: [PATCH 15/16] Revert "also revert" This reverts commit e4f4297dd48dfa1a13a7e0b0a20c70b93315031c. --- .github/workflows/ci.yaml | 110 +++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c26433822..73142d479 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,65 +15,65 @@ concurrency: cancel-in-progress: true jobs: - # build: - # name: Build (${{ matrix.python-version }}, ${{ matrix.os }}) - # runs-on: ${{ matrix.os }} - # defaults: - # run: - # shell: bash -l {0} - # strategy: - # fail-fast: false - # matrix: - # os: ["ubuntu-latest"] - # python-version: ["3.10"] - # steps: - # - uses: actions/checkout@v3 - # with: - # fetch-depth: 0 # Fetch all history for all branches and tags. - # - name: Set environment variables - # run: | - # echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV - # echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV - # - name: Cache conda - # uses: actions/cache@v3 - # with: - # path: ~/conda_pkgs_dir - # key: - # ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ - # hashFiles('ci/**.yml') }} - # - uses: conda-incubator/setup-miniconda@v2 - # with: - # channels: conda-forge - # channel-priority: strict - # mamba-version: "*" - # activate-environment: flox-tests - # auto-update-conda: false - # python-version: ${{ matrix.python-version }} - # use-only-tar-bz2: true + build: + name: Build (${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + python-version: ["3.10"] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for all branches and tags. + - name: Set environment variables + run: | + echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV + echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV + - name: Cache conda + uses: actions/cache@v3 + with: + path: ~/conda_pkgs_dir + key: + ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ + hashFiles('ci/**.yml') }} + - uses: conda-incubator/setup-miniconda@v2 + with: + channels: conda-forge + channel-priority: strict + mamba-version: "*" + activate-environment: flox-tests + auto-update-conda: false + python-version: ${{ matrix.python-version }} + use-only-tar-bz2: true - # - name: Install conda dependencies - # run: | - # mamba env update -f $CONDA_ENV_FILE + - name: Install conda dependencies + run: | + mamba env update -f $CONDA_ENV_FILE - # - name: Set up conda environment - # shell: bash -l {0} - # run: | - # python -m pip install -e . - # conda list + - name: Set up conda environment + shell: bash -l {0} + run: | + python -m pip install -e . + conda list - # - name: Run Tests - # shell: bash -l {0} - # run: | - # pytest -n auto --cov=./ --cov-report=xml + - name: Run Tests + shell: bash -l {0} + run: | + pytest -n auto --cov=./ --cov-report=xml - # - name: Upload code coverage to Codecov - # uses: codecov/codecov-action@v3.1.0 - # with: - # file: ./coverage.xml - # flags: unittests - # env_vars: RUNNER_OS,PYTHON_VERSION - # name: codecov-umbrella - # fail_ci_if_error: false + - name: Upload code coverage to Codecov + uses: codecov/codecov-action@v3.1.0 + with: + file: ./coverage.xml + flags: unittests + env_vars: RUNNER_OS,PYTHON_VERSION + name: codecov-umbrella + fail_ci_if_error: false # upstream-dev: # name: upstream-dev From c16b3475c6b4996a255207c685155b763383f2ea Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 8 Jul 2022 21:22:22 -0600 Subject: [PATCH 16/16] Revert "to-revert" This reverts commit a86fcd45aa55f05d6427ab9fa8534f2774809048. --- .github/workflows/ci-additional.yaml | 105 +++++++++++++++++++++++++++ .github/workflows/ci.yaml | 46 ++++++------ 2 files changed, 128 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/ci-additional.yaml diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml new file mode 100644 index 000000000..a4dc9024b --- /dev/null +++ b/.github/workflows/ci-additional.yaml @@ -0,0 +1,105 @@ +name: CI Additional +on: + push: + branches: + - "main" + pull_request: + branches: + - "*" + schedule: + - cron: "0 0 * * *" # Daily “At 00:00” + workflow_dispatch: # allows you to trigger manually + +jobs: + detect-ci-trigger: + name: detect ci trigger + runs-on: ubuntu-latest + if: | + github.repository == 'dcherian/flox' + && (github.event_name == 'push' || github.event_name == 'pull_request') + outputs: + triggered: ${{ steps.detect-trigger.outputs.trigger-found }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - uses: xarray-contrib/ci-trigger@v1.1 + id: detect-trigger + with: + keyword: "[skip-ci]" + + test: + name: ${{ matrix.os }} ${{ matrix.env }} + runs-on: ${{ matrix.os }} + needs: detect-ci-trigger + if: needs.detect-ci-trigger.outputs.triggered == 'false' + defaults: + run: + shell: bash -l {0} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + env: + [ + "no-xarray", + "no-dask", + "minimal-requirements", + ] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for all branches and tags. + + - name: Set environment variables + run: | + echo "CONDA_ENV_FILE=ci/${{ matrix.env }}.yml" >> $GITHUB_ENV + + - name: Cache conda + uses: actions/cache@v3 + with: + path: ~/conda_pkgs_dir + key: + ${{ runner.os }}-conda-${{ matrix.env }}-${{ + hashFiles('ci/**.yml') }} + + - uses: conda-incubator/setup-miniconda@v2 + with: + channels: conda-forge + channel-priority: strict + mamba-version: "*" + activate-environment: flox-tests + auto-update-conda: false + python-version: 3.9 + use-only-tar-bz2: true + + - name: Install conda dependencies + run: | + mamba env update -f $CONDA_ENV_FILE + + - name: Install flox + run: | + python -m pip install --no-deps -e . + + - name: Version info + run: | + conda info -a + conda list + - name: Import flox + run: | + python -c "import flox" + - name: Run tests + run: | + python -m pytest \ + -n auto \ + --cov=flox \ + --cov-report=xml + + - name: Upload code coverage to Codecov + uses: codecov/codecov-action@v3.1.0 + with: + file: ./coverage.xml + flags: unittests,${{ matrix.env }} + env_vars: RUNNER_OS + name: codecov-umbrella + fail_ci_if_error: false diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 73142d479..b22c249c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.10"] + python-version: ["3.8", "3.10"] steps: - uses: actions/checkout@v3 with: @@ -75,28 +75,28 @@ jobs: name: codecov-umbrella fail_ci_if_error: false - # upstream-dev: - # name: upstream-dev - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: conda-incubator/setup-miniconda@v2 - # with: - # channels: conda-forge - # mamba-version: "*" - # activate-environment: flox-tests - # auto-update-conda: false - # python-version: '3.10' - # - name: Set up conda environment - # shell: bash -l {0} - # run: | - # mamba env update -f ci/upstream-dev-env.yml - # python -m pip install -e . - # conda list - # - name: Run Tests - # shell: bash -l {0} - # run: | - # pytest -n 2 + upstream-dev: + name: upstream-dev + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: conda-incubator/setup-miniconda@v2 + with: + channels: conda-forge + mamba-version: "*" + activate-environment: flox-tests + auto-update-conda: false + python-version: '3.10' + - name: Set up conda environment + shell: bash -l {0} + run: | + mamba env update -f ci/upstream-dev-env.yml + python -m pip install -e . + conda list + - name: Run Tests + shell: bash -l {0} + run: | + pytest -n 2 xarray-groupby: name: xarray-groupby