Skip to content

Merge pull request #136 from NCAR/djgagne #920

Merge pull request #136 from NCAR/djgagne

Merge pull request #136 from NCAR/djgagne #920

name: Python Package using Mamba
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment_cpu.yml
- shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Lint with ruff
shell: bash -l {0}
run: |
micromamba install ruff
# stop the build if there are Python syntax errors or undefined names
ruff check --select=E9,F63,F7,F82 --exit-zero
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
ruff check --output-format concise --exit-zero
# Checking documentation errors
ruff check --select=D --exit-zero --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
pip install pytest pytest-cov
pytest tests/ --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html