test.yml
76 lines
| 2.4 KiB
| text/x-yaml
|
YamlLexer
Blazej Michalik
|
r26431 | name: Run tests | ||
Matthew Feickert
|
r26840 | on: | ||
push: | ||||
pull_request: | ||||
# Run weekly on Monday at 1:23 UTC | ||||
schedule: | ||||
- cron: '23 1 * * 1' | ||||
workflow_dispatch: | ||||
Blazej Michalik
|
r26431 | |||
jobs: | ||||
test: | ||||
Matthew Feickert
|
r26841 | runs-on: ${{ matrix.os }} | ||
Blazej Michalik
|
r26431 | strategy: | ||
matrix: | ||||
Nikita Kniazev
|
r27125 | os: [ubuntu-latest, windows-latest] | ||
Matthias Bussonnier
|
r27132 | python-version: ["3.8", "3.9", "3.10"] | ||
Nikita Kniazev
|
r27104 | deps: [test_extra] | ||
Matthew Feickert
|
r26841 | # Test all on ubuntu, test ends on macos | ||
include: | ||||
- os: macos-latest | ||||
Matthias Bussonnier
|
r27132 | python-version: "3.8" | ||
Nikita Kniazev
|
r27104 | deps: test_extra | ||
Matthew Feickert
|
r26841 | - os: macos-latest | ||
Nikita Kniazev
|
r27062 | python-version: "3.10" | ||
Nikita Kniazev
|
r27104 | deps: test_extra | ||
# Tests minimal dependencies set | ||||
- os: ubuntu-latest | ||||
python-version: "3.10" | ||||
deps: test | ||||
Nikita Kniazev
|
r27105 | # Tests latest development Python version | ||
- os: ubuntu-latest | ||||
python-version: "3.11-dev" | ||||
deps: test | ||||
Nikita Kniazev
|
r27235 | # Installing optional dependencies stuff takes ages on PyPy | ||
- os: ubuntu-latest | ||||
python-version: "pypy-3.8" | ||||
deps: test | ||||
- os: windows-latest | ||||
python-version: "pypy-3.8" | ||||
deps: test | ||||
- os: macos-latest | ||||
python-version: "pypy-3.8" | ||||
deps: test | ||||
Blazej Michalik
|
r26431 | |||
steps: | ||||
- uses: actions/checkout@v2 | ||||
- name: Set up Python ${{ matrix.python-version }} | ||||
uses: actions/setup-python@v2 | ||||
with: | ||||
python-version: ${{ matrix.python-version }} | ||||
Matthias Bussonnier
|
r27270 | cache: pip | ||
Nikita Kniazev
|
r27085 | - name: Install latex | ||
Nikita Kniazev
|
r27104 | if: runner.os == 'Linux' && matrix.deps == 'test_extra' | ||
Nikita Kniazev
|
r27085 | run: sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng | ||
Blazej Michalik
|
r26431 | - name: Install and update Python dependencies | ||
run: | | ||||
Matthias Bussonnier
|
r27269 | python -m pip install --upgrade pip setuptools wheel build | ||
Nikita Kniazev
|
r27104 | python -m pip install --upgrade -e .[${{ matrix.deps }}] | ||
python -m pip install --upgrade check-manifest pytest-cov | ||||
Matthias Bussonnier
|
r27269 | - name: Try building with Python build | ||
if: runner.os != 'Windows' # setup.py does not support sdist on Windows | ||||
run: | | ||||
python -m build | ||||
shasum -a 256 dist/* | ||||
Thomas Kluyver
|
r26440 | - name: Check manifest | ||
Nikita Kniazev
|
r27125 | if: runner.os != 'Windows' # setup.py does not support sdist on Windows | ||
Thomas Kluyver
|
r26440 | run: check-manifest | ||
Blazej Michalik
|
r26431 | - name: pytest | ||
Nikita Kniazev
|
r26992 | env: | ||
COLUMNS: 120 | ||||
Blazej Michalik
|
r26431 | run: | | ||
Matthias Bussonnier
|
r27205 | pytest --color=yes -raXxs --cov --cov-report=xml | ||
Thomas Kluyver
|
r26443 | - name: Upload coverage to Codecov | ||
Thomas Kluyver
|
r26851 | uses: codecov/codecov-action@v2 | ||