Skip to content

[WIP] Accomodate single file recipes #2502

[WIP] Accomodate single file recipes

[WIP] Accomodate single file recipes #2502

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
paths-ignore:
- 'docs/**'
pull_request:
branches: [ "main" ]
paths-ignore:
- 'docs/**'
schedule:
- cron: '0 4 * * *' # run once a day at 4 AM
env:
PYTEST_ADDOPTS: "--color=yes"
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11","3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # checkout tags (which is not done by default)
- name: πŸ” Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: 🎯 Check cache hit
run: echo '${{ steps.setup-python.outputs.cache-hit }}'
- name: 🌈 Install pangeo-forge-recipes package
shell: bash -l {0}
run: |
python -m pip install -e ".[test]"
- name: πŸ§‘β€πŸ’» On the nightly run, test upstream dev versions
if: |
github.event_name == 'schedule'
shell: bash -l {0}
run: |
python -m pip install -Ur ci/requirements-upstream-dev.txt
python -m pip install -U --pre apache-beam
- name: πŸ„β€β™‚οΈ Run Tests
shell: bash -l {0}
run: |
py.test tests -v -n auto \
--cov=pangeo_forge_recipes --cov-config .coveragerc \
--cov-report term-missing \
--cov-report xml \
--durations=10 --durations-min=1.0
- name: 🚦 Run Codecov
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request'
uses: codecov/[email protected]
with:
file: ./coverage.xml
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false