test.yml
50 lines
| 1.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: | ||||
Matthew Feickert
|
r26841 | os: [ubuntu-latest] | ||
python-version: ["3.7", "3.8", "3.9"] | ||||
# Test all on ubuntu, test ends on macos | ||||
include: | ||||
- os: macos-latest | ||||
python-version: "3.7" | ||||
- os: macos-latest | ||||
python-version: "3.9" | ||||
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 }} | ||||
- name: Install and update Python dependencies | ||||
run: | | ||||
Thomas Kluyver
|
r26442 | python -m pip install --upgrade pip setuptools wheel | ||
Blazej Michalik
|
r26431 | python -m pip install --upgrade -e file://$PWD#egg=ipython[test] | ||
python -m pip install --upgrade --upgrade-strategy eager trio curio | ||||
python -m pip install --upgrade pytest pytest-trio 'matplotlib!=3.2.0' | ||||
Thomas Kluyver
|
r26441 | python -m pip install --upgrade check-manifest pytest-cov anyio | ||
Thomas Kluyver
|
r26440 | - name: Check manifest | ||
run: check-manifest | ||||
Blazej Michalik
|
r26431 | - name: iptest | ||
run: | | ||||
cd /tmp && iptest --coverage xml && cd - | ||||
Thomas Kluyver
|
r26441 | cp /tmp/ipy_coverage.xml ./ | ||
cp /tmp/.coverage ./ | ||||
Blazej Michalik
|
r26431 | - name: pytest | ||
run: | | ||||
Matthias Bussonnier
|
r26854 | pytest -v | ||
Thomas Kluyver
|
r26443 | - name: Upload coverage to Codecov | ||
Thomas Kluyver
|
r26851 | uses: codecov/codecov-action@v2 | ||