Skip to content

conda_cron

conda_cron #1221

Workflow file for this run

name: "conda_cron"
on:
# Allow for manual trigger of workflow
workflow_dispatch:
schedule:
# At 07:00 UTC every day
- cron: "0 7 * * *"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash -leo pipefail {0}
jobs:
condacheck:
runs-on: ${{ matrix.OS }}
name: "daily conda check"
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version:
- "3.11"
- "3.12"
- "3.13"
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
fetch-depth: 0
path: gufe_repo
- name: Get Latest Version
id: latest-version
working-directory: gufe_repo
run: |
REPO="${{ github.repository }}"
VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
echo $VERSION
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-name: gufe
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
gufe=${{ steps.latest-version.outputs.VERSION }}
pooch
pytest
pytest-xdist
pygithub
condarc: |
channels:
- conda-forge
init-shell: bash
- name: Cache Pooch data
uses: actions/cache@v5
with:
path: |
# linux cache location
~/.cache/gufe
# osx cache location
~/Library/Caches/gufe
# When files are added or changed in a pooch registry
# bump this key to create a new cache, for example if
# the key is pooch-${{ matrix.os }}-1 change it to pooch-${{ matrix.os }}-2
key: pooch-${{ matrix.os }}-0
- id: run-tests
name: run tests
run: |
python -c 'import gufe;print(gufe.__version__)'
pytest -n auto --pyargs gufe
- name: raise-or-close-issue
if: ${{ always() }}
working-directory: gufe_repo
env:
CI_OUTCOME: ${{ steps.run-tests.outcome }}
TITLE: "[CI] CONDA CRON FAILURE ${{ matrix.os }} python ${{ matrix.python-version }}"
GITHUB_TOKEN: ${{ github.token }}
run: python devtools/raise-or-close-issue.py