added the lightning_flash_accumulation_in_vicinity cell method missing from imengluk #2311
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: CI Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master # Run tests only when changes are pushed to 'default' | |
workflow_dispatch: | |
jobs: | |
Sphinx-Pytest-Coverage: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
env: [environment_a, environment_b, conda-forge] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Environment creation | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: envs/${{ matrix.env }}.yml | |
init-shell: bash | |
cache-environment: true | |
- name: Environment info | |
run: | | |
micromamba info | |
micromamba list | |
shell: bash -el {0} | |
- name: sphinx documentation | |
run: | | |
make -C doc html SPHINXOPTS="-W --keep-going" | |
shell: micromamba-shell {0} | |
- name: pytest without coverage | |
if: matrix.env == 'conda-forge' | |
run: | | |
pytest | |
shell: micromamba-shell {0} | |
- name: pytest with coverage | |
if: matrix.env != 'conda-forge' | |
run: | | |
pytest --cov=improver --cov-report xml:coverage.xml | |
shell: micromamba-shell {0} | |
- name: codacy upload | |
if: env.CODACY_PROJECT_TOKEN && matrix.env == 'environment_a' | |
run: | | |
python-codacy-coverage -v -r coverage.xml | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
shell: micromamba-shell {0} | |
- name: codecov upload | |
uses: codecov/codecov-action@v5 | |
with: | |
name: ${{ matrix.env }} | |
if: matrix.env != 'conda_forge' | |
pre-commit-checks: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: improver checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
cache: 'pip' | |
- name: pip install pre-commit | |
run: | | |
pip install pre-commit | |
- name: Python interpreter version sha (PYSHA) | |
run: echo "PYSHA=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | |
- name: Cache pre-commit | |
uses: actions/cache@v4 | |
id: pre-commit-cache | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ env.PYSHA }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: pre-commit install | |
run: | | |
pre-commit install | |
- name: pre-commit run | |
run: | | |
pre-commit run --verbose --color=always --all-files | |
PR-standards: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check CONTRIBUTING.md | |
uses: cylc/release-actions/check-shortlog@v1 | |
Safety-Bandit: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
env: [environment_a, environment_b, conda-forge] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Environment creation | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: envs/${{ matrix.env }}.yml | |
init-shell: bash | |
cache-environment: true | |
- name: Environment info | |
run: | | |
micromamba info | |
micromamba list | |
shell: bash -el {0} | |
- name: safety | |
run: | | |
safety check || true | |
shell: micromamba-shell {0} | |
- name: bandit | |
run: | | |
bandit -r improver | |
shell: micromamba-shell {0} |