Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[condalock] update conda lock creation Github Action workflow and ship updated (bot-generated) conda-lock file #3307

Merged
merged 5 commits into from Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 29 additions & 25 deletions .github/workflows/create-condalock-file.yml
Expand Up @@ -6,10 +6,15 @@ on:
# and hence lots of automated PRs
# push:
# branches:
# - condalock-update
# - main
schedule:
- cron: '0 4 */10 * *'

# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: bash -l {0}

jobs:
create-lock-file:
name: Create conda lock file for latest Python
Expand All @@ -27,50 +32,49 @@ jobs:
miniforge-variant: Mambaforge
use-mamba: true
- name: Show conda config
shell: bash -l {0}
run: |
conda update -n base -c conda-forge conda
conda info
conda list
conda --version
# setup-miniconda@v2 installs an old conda and mamba
# forcing a modern mamba updates both mamba and conda
conda install -c conda-forge "mamba>=1.4.8"
conda config --show-sources
conda config --show
conda --version
mamba --version
- name: Python info
shell: bash -l {0}
run: |
which python
python --version
- name: Install conda-lock
shell: bash -l {0}
run: mamba install -y conda-lock
run: mamba install -y -c conda-forge conda-lock
- name: Check version of conda-lock
shell: bash -l {0}
run: conda-lock --version
- name: Create conda lock file for linux-64
shell: bash -l {0}
run: conda-lock lock --platform linux-64 -f environment.yml --mamba --kind explicit
- shell: bash -l {0}
- name: Show conda version again
run: conda --version
- shell: bash -l {0}
run: which python
- shell: bash -l {0}
run: python -V
- shell: bash -l {0}
- name: Show Python exec and version again
run: |
which python
python -V
- name: Create conda-lock environment
run: conda create --name esmvaltool-fromlock --file conda-linux-64.lock
- shell: bash -l {0}
- name: Install pip
run: mamba install -y pip
- shell: bash -l {0}
run: which python
- shell: bash -l {0}
run: pip --version
- shell: bash -l {0}
- name: Check Python and pip versions post pip-install
run: |
which python
pip --version
- name: Install ESMValTool
run: pip install -e .[develop]
- shell: bash -l {0}
- name: Check ESMValTool version
run: esmvaltool --help
- shell: bash -l {0}
- name: Check ESMValTool help
run: esmvaltool version
- shell: bash -l {0}
- name: Run flake8
run: flake8
- shell: bash -l {0}
- name: Run tests
run: pytest -n 2 -m "not installation"
# Automated PR
# see https://github.com/marketplace/actions/create-pull-request
Expand Down