Skip to content

Use pyproject.toml and update CI workflow. #424

Use pyproject.toml and update CI workflow.

Use pyproject.toml and update CI workflow. #424

Workflow file for this run

name: pytest
on:
push:
branches: [ main ]
paths:
- 'cmeutils/**'
- environment-dev.yml
- .github/workflows/pytest.yml
pull_request:
branches: [ main ]
paths:
- 'cmeutils/**'
- environment-dev.yml
- .github/workflows/pytest.yml
# Allows workflow to be manually triggered
workflow_dispatch:
jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Build environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
shell: bash -l {0}
run: pip install .
- name: Run pytest with coverage report
shell: bash -l {0}
run: python -m pytest -v -rs --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml