Skip to content

clean file

clean file #945

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: Configure Conda
run: |
echo "removing conda default channels, appending open-source ones"
conda config --append channels conda-forge
conda config --append channels noaa-gfdl
conda config --remove channels defaults
echo "setting strict channel priority"
conda config --set channel_priority strict
echo "printing conda config just in case"
conda config --show
- name: Update Conda and Channel Package Indices
run: |
echo "updating conda and package channel indices for conda-forge, noaa-gfdl"
conda update -y conda
conda update -y --all --override-channels -c conda-forge
conda update -y --all --override-channels -c noaa-gfdl
- 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
conda list -n fre-workflows
# add conda env's executables to github's PATH equiv.
echo $CONDA/envs/fre-workflows/bin >> $GITHUB_PATH
- name: cylc lint workflow files
run: |
cylc lint -v
- name: Jinja2filter pytest
run: |
pytest -vv -rx ./Jinja2Filters/tests
- name: Jinja2filter pylint
run: |
pylint -v --rcfile ./pylintrc --fail-under 7.2 ./Jinja2Filters
- name: lib/python pytest
run: |
pytest -vv -rx ./lib/python/tests
- name: lib/python pylint
run: |
pylint -v --rcfile ./pylintrc --fail-under 9.8 ./lib/python
- name: python macros pytest
run: |
pytest -vv -rx ./meta/lib/python/macros/tests
- name: python macros pylint
run: |
pylint -v --rcfile ./pylintrc --fail-under 7.5 ./meta/lib/python/macros/
- name: make-timeseries pytest
run: |
pytest -vv -rx ./app/make-timeseries/tests
- name: make-timeseries pylint
run: |
pylint -v --rcfile ./pylintrc --fail-under 9.6 ./app/make-timeseries
- name: combine-statics pytest
run: |
pytest -vv -rx ./app/combine-statics/tests
- name: combine-statics pylint
run: |
pylint -v --rcfile ./pylintrc --fail-under 10.0 ./app/combine-statics
- name: rename-split-to-pp pytest
run: |
pytest -vv -rx app/rename-split-to-pp/tests
- name: rename-split-to-pp pylint
run: |
pylint -v --rcfile ./pylintrc --fail-under 3.2 ./app/rename-split-to-pp
- name: combine-timeavgs pytest (STEP CONTINUES ON FAILURE)
continue-on-error: true
run: |
echo "i have no tests yet"
pytest -vv -rx app/combine-timeavgs/tests
- name: combine-timeavgs pylint (STEP CONTINUES ON FAILURE)
continue-on-error: true
run: |
echo "i am not python in any part yet"
pylint -v --rcfile ./pylintrc --fail-under 0.0 ./app/combine-timeavgs
- name: make-timeavgs pytest (STEP CONTINUES ON FAILURE)
continue-on-error: true
run: |
echo "i have no tests yet"
pytest -vv -rx app/make-timeavgs/tests
- name: make-timeavgs pylint (STEP CONTINUES ON FAILURE)
continue-on-error: true
run: |
echo "i am not python in any part yet"
pylint -v --rcfile ./pylintrc --fail-under 0.0 ./app/make-timeavgs
- name: analysis pytest (STEP CONTINUES ON FAILURE)
continue-on-error: true
run: |
echo "i have no tests yet"
pytest -vv -rx app/analysis/tests
- name: analysis pylint (STEP CONTINUES ON FAILURE)
continue-on-error: true
run: |
echo "i am not python in any part yet"
pylint -v --rcfile ./pylintrc --fail-under 0.0 ./app/analysis