File: test.yml

package info (click to toggle)
ipython 8.35.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,900 kB
  • sloc: python: 42,442; sh: 376; makefile: 243
file content (109 lines) | stat: -rw-r--r-- 4,266 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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 }}
    # Disable scheduled CI runs on forks
    if: github.event_name != 'schedule' || github.repository_owner == 'ipython'
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest]
        python-version: ["3.10", "3.11", "3.12","3.13"]
        deps: [test_extra]
        # Test all on ubuntu, test ends on macos
        include:
          - os: macos-latest
            python-version: "3.10"
            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.13"
            deps: test
          # Installing optional dependencies stuff takes ages on PyPy
          - os: ubuntu-latest
            python-version: "pypy-3.10"
            deps: test
          - os: windows-latest
            python-version: "pypy-3.10"
            deps: test
          - os: macos-latest
            python-version: "pypy-3.10"
            deps: test
          # Temporary CI run to use entry point compatible code in matplotlib-inline.
          - os: ubuntu-latest
            python-version: "3.12"
            deps: test_extra
            want-latest-entry-point-code: true

    steps:
    - uses: actions/checkout@v4
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
        cache: pip
        cache-dependency-path: |
          pyproject.toml
    - 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<8'
    - 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 --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-binary curio --upgrade -e .[${{ matrix.deps }}]
        python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --upgrade check-manifest pytest-cov
    - 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: Install entry point compatible code (TEMPORARY)
      if: matrix.want-latest-entry-point-code
      run: |
        python -m pip list
        # Not installing matplotlib's entry point code as building matplotlib from source is complex.
        # Rely upon matplotlib to test all the latest entry point branches together.
        python -m pip install --upgrade git+https://github.com/ipython/matplotlib-inline.git@main
        python -m pip list

    - name: pytest
      env:
        COLUMNS: 120
      run: |
        pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} --maxfail=15
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v5
      with:
         name: Test
         files: /home/runner/work/ipython/ipython/coverage.xml