From 30268168369ac46e9e1b85de4fe55069b78af3a9 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Fri, 7 Apr 2023 11:15:42 +0100 Subject: [PATCH 01/14] conda cron job canary --- .github/workflows/conda_cron.yaml | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/conda_cron.yaml diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml new file mode 100644 index 000000000..ec53f07b6 --- /dev/null +++ b/.github/workflows/conda_cron.yaml @@ -0,0 +1,51 @@ +name: "conda_cron" +on: + pull_request: + branches: + - main + push: + branches: + - main + schedule: + # At 07:00 UTC every day + - cron: "0 7 * * *" + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +defaults: + run: + shell: bash -l {0} + +jobs: + condacheck: + runs-on: ${{ matrix.OS }}-latest + name: "daily conda check" + strategy: + fail-fast: false + matrix: + os: ['ubuntu', 'macos'] + python-version: + - "3.9" + - "3.10" + + steps: + - name: Setup Micromamba + uses: mamba-org/provision-with-micromamba@main + with: + environment-file: False + environment-name: openfe + channels: conda-forge + extra-specs: | + python==${{ matrix.python-version }} + + - name: "Install openfe + optional deps" + run: micromamba install openfe pytest -c conda-forge + + - name: "Run tests" + run: pytest --pyargs openfe openfecli + + - name: "WIP" + run: | + micromamba list From 94fd58b4ca6252571a92df01970408a825d215a4 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Tue, 23 Jul 2024 12:01:02 -0400 Subject: [PATCH 02/14] add conda cron job --- .github/workflows/conda_cron.yaml | 37 +++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index ec53f07b6..f472cdf41 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -20,32 +20,45 @@ defaults: jobs: condacheck: - runs-on: ${{ matrix.OS }}-latest + runs-on: ${{ matrix.OS }} name: "daily conda check" strategy: fail-fast: false matrix: - os: ['ubuntu', 'macos'] + os: ['ubuntu-latest', 'macos-latest', 'macos-13'] python-version: - "3.9" - "3.10" + - "3.11" + - "3.12" steps: - name: Setup Micromamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: - environment-file: False environment-name: openfe - channels: conda-forge - extra-specs: | - python==${{ matrix.python-version }} + create-args: >- + python=${{ matrix.python-version }} + pip + condarc: | + channels: + - jaimergp/label/unsupported-cudatoolkit-shim + - conda-forge + init-shell: bash - name: "Install openfe + optional deps" - run: micromamba install openfe pytest -c conda-forge - - - name: "Run tests" - run: pytest --pyargs openfe openfecli + run: | + micromamba install openfe pytest -c conda-forge + python -m pip install pytest-xdist PyGithub - - name: "WIP" + - name: "env info" run: | + micormamba info micromamba list + pip list + + - id: run-tests + name: "Run tests" + run: | + # note: this only runs the fast tests + pytest -n auto --pyargs openfe openfecli From 0c072fd7646bda01604ad4392d8f373595f61b5b Mon Sep 17 00:00:00 2001 From: IAlibay Date: Tue, 23 Jul 2024 12:02:39 -0400 Subject: [PATCH 03/14] Add dispatch trigger --- .github/workflows/conda_cron.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index f472cdf41..7f640e0d5 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -1,5 +1,6 @@ name: "conda_cron" on: + workflow_dispatch: pull_request: branches: - main From e054f2e594227562dfd9bedefd878d4ff89d9e05 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Tue, 23 Jul 2024 12:46:23 -0400 Subject: [PATCH 04/14] 12 not 13 for macos --- .github/workflows/conda_cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index 7f640e0d5..7d245ec4a 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'macos-latest', 'macos-13'] + os: ['ubuntu-latest', 'macos-latest', 'macos-12'] python-version: - "3.9" - "3.10" From 44b25b3ee03943f052c075ed1c9e324f4a456111 Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Tue, 23 Jul 2024 18:11:56 +0100 Subject: [PATCH 05/14] Update conda_cron.yaml --- .github/workflows/conda_cron.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index 7d245ec4a..ee487875b 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -57,6 +57,7 @@ jobs: micormamba info micromamba list pip list + ls /Users/runner/micromamba/envs/openfe/lib/python*/site-packages/openfe/tests/data/lomap_basic/ - id: run-tests name: "Run tests" From 8394ffeac8bd23a8afcc70ea1394e8deeab72a93 Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Tue, 23 Jul 2024 22:45:05 +0100 Subject: [PATCH 06/14] Update conda_cron.yaml --- .github/workflows/conda_cron.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index ee487875b..2c92d0af1 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -10,7 +10,7 @@ on: schedule: # At 07:00 UTC every day - cron: "0 7 * * *" - + concurrency: group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true @@ -32,6 +32,9 @@ jobs: - "3.10" - "3.11" - "3.12" + exclude: + - os: 'macos-latest' + python-version: '3.9' steps: - name: Setup Micromamba @@ -50,15 +53,13 @@ jobs: - name: "Install openfe + optional deps" run: | micromamba install openfe pytest -c conda-forge - python -m pip install pytest-xdist PyGithub + python -m pip install pytest-xdist - name: "env info" run: | micormamba info micromamba list pip list - ls /Users/runner/micromamba/envs/openfe/lib/python*/site-packages/openfe/tests/data/lomap_basic/ - - id: run-tests name: "Run tests" run: | From 6de24867726ddbf53ca46e6408e65cbd66613b8c Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:31:15 -0700 Subject: [PATCH 07/14] make sure we install latest version of openfe --- .github/workflows/conda_cron.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index 2c92d0af1..d4f9d48b1 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -17,7 +17,7 @@ concurrency: defaults: run: - shell: bash -l {0} + shell: bash -leo pipefail {0} jobs: condacheck: @@ -52,7 +52,7 @@ jobs: - name: "Install openfe + optional deps" run: | - micromamba install openfe pytest -c conda-forge + micromamba install openfe=1.0.1 pytest -c conda-forge python -m pip install pytest-xdist - name: "env info" From 6f5c44269321b6d880053d0128023b53fbf046f3 Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:39:24 -0700 Subject: [PATCH 08/14] install latest version found on conda-forge --- .github/workflows/conda_cron.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index d4f9d48b1..e1bfb40df 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -44,6 +44,7 @@ jobs: create-args: >- python=${{ matrix.python-version }} pip + jq condarc: | channels: - jaimergp/label/unsupported-cudatoolkit-shim @@ -52,7 +53,10 @@ jobs: - name: "Install openfe + optional deps" run: | - micromamba install openfe=1.0.1 pytest -c conda-forge + # get latest version from conda-forge + LATEST_VERSION = $(micromamba search --json openmm | jq '.result.pkgs[0].version') + echo "LATEST_VERSION: $LATEST_VERSION" + micromamba install openfe=$LATEST_VERSION pytest -c conda-forge python -m pip install pytest-xdist - name: "env info" From 83d78434a0f65c092b6b2849386ba4dcfde99870 Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:32:48 -0700 Subject: [PATCH 09/14] bash syntax? don't know her --- .github/workflows/conda_cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index e1bfb40df..dddccaef4 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -54,7 +54,7 @@ jobs: - name: "Install openfe + optional deps" run: | # get latest version from conda-forge - LATEST_VERSION = $(micromamba search --json openmm | jq '.result.pkgs[0].version') + LATEST_VERSION=$(micromamba search --json openmm | jq '.result.pkgs[0].version') echo "LATEST_VERSION: $LATEST_VERSION" micromamba install openfe=$LATEST_VERSION pytest -c conda-forge python -m pip install pytest-xdist From 6a70c4fed34adfa2acb300187271424ebf8b7f6a Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:38:24 -0700 Subject: [PATCH 10/14] openfe latest not openmm --- .github/workflows/conda_cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index dddccaef4..2da903df1 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -54,7 +54,7 @@ jobs: - name: "Install openfe + optional deps" run: | # get latest version from conda-forge - LATEST_VERSION=$(micromamba search --json openmm | jq '.result.pkgs[0].version') + LATEST_VERSION=$(micromamba search --json openfe | jq '.result.pkgs[0].version') echo "LATEST_VERSION: $LATEST_VERSION" micromamba install openfe=$LATEST_VERSION pytest -c conda-forge python -m pip install pytest-xdist From 0c2952a1b528fc5758d17db2ef21da181a0c9b6b Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:51:05 -0700 Subject: [PATCH 11/14] use some bash PE tricks --- .github/workflows/conda_cron.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index 2da903df1..5716f4eb1 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -56,7 +56,9 @@ jobs: # get latest version from conda-forge LATEST_VERSION=$(micromamba search --json openfe | jq '.result.pkgs[0].version') echo "LATEST_VERSION: $LATEST_VERSION" - micromamba install openfe=$LATEST_VERSION pytest -c conda-forge + # Removing the quotes from the vesrion number + # https://mywiki.wooledge.org/BashGuide/Parameters#Parameter_Expansion + micromamba install openfe=${LATEST_VERSION//\"} pytest -c conda-forge python -m pip install pytest-xdist - name: "env info" From e9556da587d8553ebd9f04b0d7b1b42225a80389 Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:56:36 -0700 Subject: [PATCH 12/14] fix typo in micromamba cmd --- .github/workflows/conda_cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index 5716f4eb1..10185d6ef 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -63,7 +63,7 @@ jobs: - name: "env info" run: | - micormamba info + micromamba info micromamba list pip list - id: run-tests From 1f885060e5054bab4a428cf558a18b4260b893f2 Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:27:00 -0700 Subject: [PATCH 13/14] update codecov action --- .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 99c6d4a35..fe0d34276 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -122,7 +122,7 @@ jobs: - name: codecov-pr if: ${{ github.repository == 'OpenFreeEnergy/openfe' && github.event_name == 'pull_request' }} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: coverage.xml @@ -137,7 +137,7 @@ jobs: if: ${{ github.repository == 'OpenFreeEnergy/openfe' && github.event_name != 'schedule' && github.event_name != 'pull_request' }} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: coverage.xml From 357511c7e42f260c84214a4cd78d9ef3fd64dc81 Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:32:11 -0700 Subject: [PATCH 14/14] removed run on each PR --- .github/workflows/conda_cron.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/conda_cron.yaml b/.github/workflows/conda_cron.yaml index 10185d6ef..2014340ff 100644 --- a/.github/workflows/conda_cron.yaml +++ b/.github/workflows/conda_cron.yaml @@ -1,12 +1,6 @@ name: "conda_cron" on: workflow_dispatch: - pull_request: - branches: - - main - push: - branches: - - main schedule: # At 07:00 UTC every day - cron: "0 7 * * *"