Tests #299
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: Tests | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 4 * * 1" # Night to Monday | |
jobs: | |
test: | |
name: Python ${{ matrix.python-version }} - mpl ${{ matrix.mpl-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
mpl-version: ["3.7", "3.8", "latest"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: "x64" | |
- name: Get pip cache dir | |
id: pip-cache | |
run: | | |
echo "::set-output name=dir::$(pip cache dir)" | |
- name: pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python-version }}- | |
${{ runner.os }}-pip- | |
- if: matrix.mpl-version=='latest' | |
name: Install dev Matplotlib | |
run: pip install git+https://github.com/matplotlib/matplotlib.git | |
- if: matrix.mpl-version!='latest' | |
name: Install matplotlib pinned | |
run: pip install --upgrade --pre --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --extra-index-url https://pypi.org/simple matplotlib | |
- name: Install | |
run: | | |
pip install ".[test]" | |
- name: Tests | |
run: | | |
pytest --mpl --color=yes --cov=mplsignal --cov-branch tests | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
test-scipy: | |
name: SciPy - Python ${{ matrix.python-version }} - mpl ${{ matrix.mpl-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
mpl-version: ["3.7", "latest"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: "x64" | |
- name: Get pip cache dir | |
id: pip-cache | |
run: | | |
echo "::set-output name=dir::$(pip cache dir)" | |
- name: pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python-version }}- | |
${{ runner.os }}-pip- | |
- if: matrix.mpl-version=='latest' | |
name: Install dev Matplotlib | |
run: pip install git+https://github.com/matplotlib/matplotlib.git | |
- if: matrix.mpl-version!='latest' | |
name: Install matplotlib pinned | |
run: pip install --upgrade --pre --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --extra-index-url https://pypi.org/simple matplotlib | |
- name: Install scipy | |
run: pip install scipy | |
- name: Install | |
run: | | |
pip install ".[test]" | |
- name: Tests | |
run: | | |
pytest --mpl --color=yes --cov=mplsignal --cov-branch tests | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |