Add refinediag preanalysis remote tests #1068
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: create_test_conda_env | |
| on: | |
| push: | |
| branches: | |
| - main # only run on push to main (post-merge) | |
| pull_request: # run for any PR targeting any branch | |
| 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: 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: 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 |