docs: migrate to readthedocs config v2 #61
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 | |
on: | |
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming | |
# Existing codes likely still have "master" as the primary branch | |
# Both are tracked here to keep legacy and new codes working | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
python-version: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Additional info about the build | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: devtools/conda-envs/test_env-${{ matrix.python-version }}.yaml | |
environment-name: python-${{ matrix.python-version }}-env | |
- name: Install package | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
run: | | |
python -m pip install -e . --no-deps | |
pip freeze | |
- name: Run tests | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
run: | | |
pytest -v --cov=src/pyplif_hippos --cov-report=xml --color=yes tests | |
- name: CodeCov | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} | |
verbose: true |