Skip to content

MNT: Use pyproject.toml for project metadata (#172) #433

MNT: Use pyproject.toml for project metadata (#172)

MNT: Use pyproject.toml for project metadata (#172) #433

Workflow file for this run

name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
test:
needs: linting
name: ${{ matrix.os }}, ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
python-version: ${{ matrix.python-version }}
conda-channels: conda-forge
- name: Install Env
shell: bash
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n test python=${{ matrix.python-version }} odc-geo geopandas rasterio scipy rioxarray xarray netcdf4 pandoc
source activate test
python -m pip install -r requirements/dev.txt
python -m pip install -e .
- name: Check and Log Environment
shell: bash
run: |
source activate test
python -V
python -c "import geocube; geocube.show_versions();"
conda info
- name: Pylint
shell: bash
run: |
source activate test
python -m pylint geocube
- name: mypy
shell: bash
run: |
source activate test
python -m mypy geocube/
- name: Test
shell: bash
run: |
source activate test
pytest --cov-report term-missing --cov=geocube --cov-report xml
- name: Test Build docs
shell: bash
if: contains(matrix.os, 'ubuntu')
run: |
source activate test
sphinx-build -b html docs/ docs/_build/
- uses: codecov/codecov-action@v4