Skip to content

Backport PR #14169: Set instance on singleton configurable when creat… #89

Backport PR #14169: Set instance on singleton configurable when creat…

Backport PR #14169: Set instance on singleton configurable when creat… #89

Workflow file for this run

name: Run tests
on:
push:
branches:
- main
- '*.x'
pull_request:
# Run weekly on Monday at 1:23 UTC
schedule:
- cron: '23 1 * * 1'
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
deps: [test_extra]
# Test all on ubuntu, test ends on macos
include:
- os: macos-latest
python-version: "3.8"
deps: test_extra
- os: macos-latest
python-version: "3.11"
deps: test_extra
# Tests minimal dependencies set
- os: ubuntu-latest
python-version: "3.11"
deps: test
# Tests latest development Python version
- os: ubuntu-latest
python-version: "3.12-dev"
deps: test
# 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
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
cache-dependency-path: |
setup.cfg
- name: Install latex
if: runner.os == 'Linux' && matrix.deps == 'test_extra'
run: echo "disable latex for now, issues in mirros" #sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng
- name: Install and update Python dependencies (binary only)
if: ${{ ! contains( matrix.python-version, 'dev' ) }}
run: |
python -m pip install --only-binary ':all:' --upgrade pip setuptools wheel build
python -m pip install --only-binary ':all:' --no-binary curio --upgrade -e .[${{ matrix.deps }}]
python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest-json-report
- name: Install and update Python dependencies (dev?)
if: ${{ contains( matrix.python-version, 'dev' ) }}
run: |
python -m pip install --pre --upgrade pip setuptools wheel build
python -m pip install --pre --no-binary curio --upgrade -e .[${{ matrix.deps }}]
python -m pip install --pre --upgrade check-manifest pytest-cov pytest-json-report
- 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/*
- name: Check manifest
if: runner.os != 'Windows' # setup.py does not support sdist on Windows
run: check-manifest
- name: pytest
env:
COLUMNS: 120
run: |
pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} --json-report --json-report-file=./report-${{ matrix.python-version }}-${{runner.os}}.json
- uses: actions/upload-artifact@v3
with:
name: upload pytest timing reports as json
path: |
./report-*.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Test
files: /home/runner/work/ipython/ipython/coverage.xml