v1.6.0 calculate via ellipsoid, river area, codecov #204
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: pytests | |
on: | |
pull_request: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest #ubuntu-20.04 # specifically calls the version number instead of latest to work on 'act' | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
python-version: ['3.10', '3.11', '3.12'] | |
name: Python (${{ matrix.python-version }} on ${{ matrix.os }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Test with pytest and generate coverage reports | |
run: | | |
python -m pytest --cov=./centerline_width --cov-report=xml --junitxml=pytest.xml | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test results for ${{ matrix.os }}-${{ matrix.python-version }} | |
path: pytest.xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.1.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
file: ./coverage.xml | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: false |