Skip to content

Merge pull request #71 from Sheila-nk/plugin-checker #179

Merge pull request #71 from Sheila-nk/plugin-checker

Merge pull request #71 from Sheila-nk/plugin-checker #179

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: pip
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8']
os: [ubuntu-latest]
# pip cache paths
include:
- os: ubuntu-latest
path: ~/.cache/pip
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# use pip caching
- uses: actions/cache@v2
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Install dependencies
- name: Install
run: |
python -m pip install numpy scipy matplotlib pytest
python -m pip install -e .
- name: Self-test
run: |
pytest --pyargs scpdt -v -s
- name: Self-test CLI
run: |
python -m scpdt scpdt/tests/finder_cases.py -vv
- name: Test testfile CLI
run: |
python -m scpdt ./scpdt/tests/scipy_linalg_tutorial_clone.rst -v
- name: Run testmod a scipy submodule
run: |
python -c'from scipy.linalg import _basic; from scpdt import testmod; testmod(_basic, verbose=True)'
- name: Run testmod a scipy submodule -- Public API onlly
run: |
python -c'from scipy import linalg; from scpdt import testmod; testmod(linalg, verbose=True, strategy="api")'
- name: Test pytest plugin
# This test will fail in a venv where scpdt has not been installed and the plugin has not been activated
run: |
python -m pytest scpdt/tests/module_cases.py --doctest-modules