From ef2ba5d1254305045e067aa84cb8bbc9ca315555 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:26:28 +0100 Subject: [PATCH 1/9] test on python 3.13 --- .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 40abd8c..92ca310 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,7 +47,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.11", "3.12"] + python-version: ["3.11", "3.13"] steps: - uses: actions/checkout@v4 From 469e25b2ef2a26e8df6af5a567751846ae6c9ed9 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:29:57 +0100 Subject: [PATCH 2/9] allow skipping ci based on a label --- .github/workflows/ci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92ca310..95230c0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,7 +35,10 @@ jobs: name: ${{ matrix.os }} py${{ matrix.python-version }} runs-on: ${{ matrix.os }} needs: detect-ci-trigger - if: needs.detect-ci-trigger.outputs.triggered == 'false' + if: | + needs.detect-ci-trigger.outputs.triggered == 'false' + || contains(github.event.pull_request.labels.*.name, 'skip-ci') + env: FORCE_COLOR: 3 CONDA_ENV_FILE: "ci/requirements/environment.yaml" From 363eec5699939d768c02189865f82c39efb88738 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:31:05 +0100 Subject: [PATCH 3/9] configure dependabot --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8a2d4fb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates once a week + interval: "weekly" + groups: + actions: + patterns: + - "*" From 260b63621e628751e964d1db9ddac9f58b9eb60e Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:31:11 +0100 Subject: [PATCH 4/9] exclude bots from releases --- .github/release.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..9d1e098 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,5 @@ +changelog: + exclude: + authors: + - dependabot + - pre-commit-ci From 0674b8176a922487209eaf0e68ffab73ffa799a7 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:34:30 +0100 Subject: [PATCH 5/9] verify that CI is skipped based on the label From 85f6539ba8ec4b7be6681e5daee6fcffaa910131 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:37:26 +0100 Subject: [PATCH 6/9] try using booleans instead --- .github/workflows/ci.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 95230c0..8e8257f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,11 @@ jobs: github.repository == 'xarray-contrib/xarray-array-testing' && (github.event_name == 'push' || github.event_name == 'pull_request') outputs: - triggered: ${{ steps.detect-trigger.outputs.trigger-found }} + triggered: | + ${{ + steps.detect-trigger.outputs.trigger-found == 'true' + || contains(github.event.pull_request.labels.*.name, 'skip-ci') + }} steps: - uses: actions/checkout@v4 with: @@ -35,9 +39,7 @@ jobs: name: ${{ matrix.os }} py${{ matrix.python-version }} runs-on: ${{ matrix.os }} needs: detect-ci-trigger - if: | - needs.detect-ci-trigger.outputs.triggered == 'false' - || contains(github.event.pull_request.labels.*.name, 'skip-ci') + if: ! needs.detect-ci-trigger.outputs.triggered env: FORCE_COLOR: 3 From 1e8440439e37d67c57e35eae42cb8762ed39951f Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:39:42 +0100 Subject: [PATCH 7/9] next attempt --- .github/workflows/ci.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8e8257f..62dc271 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,12 +19,9 @@ jobs: if: | github.repository == 'xarray-contrib/xarray-array-testing' && (github.event_name == 'push' || github.event_name == 'pull_request') + && !contains(github.event.pull_request.labels.*.name, 'skip-ci') outputs: - triggered: | - ${{ - steps.detect-trigger.outputs.trigger-found == 'true' - || contains(github.event.pull_request.labels.*.name, 'skip-ci') - }} + triggered: ${{ steps.detect-trigger.outputs.trigger-found }} steps: - uses: actions/checkout@v4 with: @@ -39,7 +36,7 @@ jobs: name: ${{ matrix.os }} py${{ matrix.python-version }} runs-on: ${{ matrix.os }} needs: detect-ci-trigger - if: ! needs.detect-ci-trigger.outputs.triggered + if: needs.detect-ci-trigger.outputs.triggered == 'false' env: FORCE_COLOR: 3 From a7192e3fd08a431e920c757b47444562810159c4 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:40:34 +0100 Subject: [PATCH 8/9] don't try to install conda (still not available on conda-forge for python 3.13, but also the extra info from `conda info -a` may not be that important) --- .github/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 62dc271..f0f8200 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -65,7 +65,6 @@ jobs: cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" create-args: >- python=${{matrix.python-version}} - conda - name: Install nightly xarray run: | @@ -75,11 +74,6 @@ jobs: run: | python -m pip install --no-deps -e . - - name: Version info - run: | - conda info -a - conda list - - name: Import xarray-array-testing run: | python -c 'import xarray_array_testing' From 8a8f9ef844071ceb53a9bb34b6b8943c64e9621a Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sat, 15 Feb 2025 16:51:13 +0100 Subject: [PATCH 9/9] work around deprecated behavior --- .github/workflows/ci.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f0f8200..82b26ce 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,13 +79,17 @@ jobs: python -c 'import xarray_array_testing' - name: Restore cached hypothesis directory - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: .hypothesis/ key: cache-hypothesis - enableCrossOsArchive: true - save-always: true - name: Run tests run: | python -m pytest --cov=xarray_array_testing + + - name: Cache hypothesis directory + uses: actions/cache/save@v4 + with: + path: .hypothesis/ + key: cache-hypothesis