Skip to content

Commit

Permalink
conda environment.yml for environment inwhich to run certain fre-work…
Browse files Browse the repository at this point in the history
…flow things. another workflow yaml gutted from fre-cli for pipeline that lints cylc files and runs data_lineage pytest to start.
  • Loading branch information
ilaflott committed Oct 4, 2024
1 parent 3d75b57 commit ec79751
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/create_test_conda_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: create_test_conda_env

on: [push]

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.9'

- name: Add conda to system path
run: |
# $CONDA is an env var pointing to root of miniconda dir
echo $CONDA/bin >> $GITHUB_PATH

- name: Create fre-workflows environment
run: |
# create environment containing all dependencies
# the env cannot be explicitly activated in github CI/CD
conda env create -f environment.yml --name fre-workflows

# add conda env's executables to github's PATH equiv.
echo $CONDA/envs/fre-workflows/bin >> $GITHUB_PATH

- name: Run unittest in fre-workflows environment
run: |
# try to make sure the right things are in GITHUB_PATH
echo $CONDA/envs/fre-workflows/bin >> $GITHUB_PATH
cylc lint -v
cd data_lineage && python -m unittest discover -s test
18 changes: 18 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: fre-workflows
channels:
- defaults
- conda-forge
- noaa-gfdl
dependencies:
- python
- pip
- click
- pyyaml
- pylint
- jsonschema
- conda-forge::cylc-flow>=8.2.0
- conda-forge::cylc-rose
- conda-forge::metomi-rose
- conda-forge::cylc-uiserver
- conda-forge::pytest
- conda-forge::pytest-cov

0 comments on commit ec79751

Please sign in to comment.