Skip to content

Commit

Permalink
[condalock] update conda lock creation Github Action workflow and shi…
Browse files Browse the repository at this point in the history
…p updated (bot-generated) conda-lock file (#3307)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: valeriupredoi <valeriupredoi@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 2, 2023
1 parent f3ad0a0 commit 9485a64
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 145 deletions.
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

0 comments on commit 9485a64

Please sign in to comment.