In combine_fragments, cast fragments
to list if improperly decoded
#1288
Workflow file for this run
This file contains 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: Tests | |
on: | |
push: | |
branches: [ "main" ] | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: | |
- 'docs/**' | |
env: | |
PYTEST_ADDOPTS: "--color=yes" | |
# This our primary testing workflow. | |
# | |
# It also serves as an example for how to reference the separate prepare-env workflow. | |
# This workflow does not even attempt to build environments. It dispatches that resposibility | |
# to the prepare-env workflow and then loads the environments which that workflow has cached. | |
# | |
# Note that all of the steps listed under the comment ``# generic steps to load env from cache`` | |
# are required to load the environment. They include: | |
# - Generating the cache key | |
# - Actually loading the environment using the key | |
# - Adding the path ``/usr/share/miniconda3/envs/pangeo-forge-recipes/bin`` to $PATH | |
jobs: | |
prepare-env: | |
uses: ./.github/workflows/prepare-env.yaml | |
run-tests: | |
needs: prepare-env | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10"] | |
dependencies: ["releases-only", "upstream-dev"] | |
steps: | |
- uses: actions/checkout@v2 | |
# generic steps to load env from cache | |
- name: π― Set cache number | |
id: cache-number | |
# cache will last 3 days by default | |
run: echo CACHE_NUMBER=`expr $(date +'%j') / 3` >> $GITHUB_ENV | |
- name: π― Set environment file | |
id: env-file | |
run: echo "env_file=ci/py${{ matrix.python-version }}.yml" >> $GITHUB_ENV | |
- uses: actions/cache@v2 | |
name: π Loaded Cached environment | |
with: | |
path: /usr/share/miniconda3/envs/pangeo-forge-recipes | |
key: ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ hashFiles( env.env_file ) }}-${{ matrix.dependencies }}-${{ env.CACHE_NUMBER }} | |
id: conda-cache | |
- name: π€Ώ Bail out if no cache hit | |
if: steps.conda-cache.outputs.cache-hit != 'true' | |
run: false | |
- name: π― Set path to include conda python | |
run: echo "/usr/share/miniconda3/envs/pangeo-forge-recipes/bin" >> $GITHUB_PATH | |
# custom testing steps unique to this workflow | |
- name: π Install pangeo-forge-recipes package | |
shell: bash -l {0} | |
run: | | |
python -m pip install --no-deps -e . | |
- name: πββοΈ Run Tests | |
shell: bash -l {0} | |
run: | | |
py.test tests -v \ | |
--cov=pangeo_forge_recipes --cov-config .coveragerc \ | |
--cov-report term-missing \ | |
--cov-report xml \ | |
--durations=10 --durations-min=1.0 | |
- name: π¦ Run Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage.xml | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: false |