Skip to content

Eodal v0.2.2

Eodal v0.2.2 #186

Workflow file for this run

# Regular tests
#
# Use this to ensure your tests are passing on every push and PR (skipped on
# pushes which only affect documentation).
# There is also a cron job set to run weekly on the default branch, to check
# against dependency chain rot.
#
# You should make sure you run jobs on at least the *oldest* and the *newest*
# versions of python that your codebase is intended to support.
name: tests
on:
push:
pull_request:
schedule:
- cron: "0 0 * * 1"
branches: [ $default-branch ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10"]
include:
- os: windows-latest
python-version: "3.10"
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: System information
run: python .github/workflows/system_info.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install flake8
python -m pip install --editable .[test]
- name: Sanity check with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
python -m flake8 . --count --exit-zero --statistics
- name: Debug environment
run: python -m pip freeze
- name: Test with pytest
run: |
python -m pip install pytest
python -m pip install pytest-cov
python -m pytest --cov=eodal --cov-report term --cov-report xml --cov-config .coveragerc --junitxml=testresults.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: unittests
env_vars: OS,PYTHON
name: Python ${{ matrix.python-version }} on ${{ runner.os }}
- name: Build HTML docs
run: |
python -m pip install --editable .[docs]
cd docs
make html
cd ..