Show More
@@ -1,116 +1,115 | |||
|
1 | 1 | name: Run tests |
|
2 | 2 | |
|
3 | 3 | on: |
|
4 | 4 | push: |
|
5 | 5 | branches: |
|
6 | 6 | - main |
|
7 | 7 | - '*.x' |
|
8 | 8 | pull_request: |
|
9 | 9 | # Run weekly on Monday at 1:23 UTC |
|
10 | 10 | schedule: |
|
11 | 11 | - cron: '23 1 * * 1' |
|
12 | 12 | workflow_dispatch: |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | jobs: |
|
16 | 16 | test: |
|
17 | 17 | runs-on: ${{ matrix.os }} |
|
18 | 18 | # Disable scheduled CI runs on forks |
|
19 | 19 | if: github.event_name != 'schedule' || github.repository_owner == 'ipython' |
|
20 | 20 | strategy: |
|
21 | 21 | fail-fast: false |
|
22 | 22 | matrix: |
|
23 | 23 | os: [ubuntu-latest, windows-latest] |
|
24 | 24 | python-version: ["3.10", "3.11", "3.12"] |
|
25 | 25 | deps: [test_extra] |
|
26 | 26 | # Test all on ubuntu, test ends on macos |
|
27 | 27 | include: |
|
28 | 28 | - os: macos-latest |
|
29 | 29 | python-version: "3.10" |
|
30 | 30 | deps: test_extra |
|
31 | 31 | - os: macos-latest |
|
32 | 32 | python-version: "3.11" |
|
33 | 33 | deps: test_extra |
|
34 | 34 | # Tests minimal dependencies set |
|
35 | 35 | - os: ubuntu-latest |
|
36 | 36 | python-version: "3.11" |
|
37 | 37 | deps: test |
|
38 | 38 | # Tests latest development Python version |
|
39 | 39 | - os: ubuntu-latest |
|
40 | 40 | python-version: "3.13-dev" |
|
41 | 41 | deps: test |
|
42 | 42 | # Installing optional dependencies stuff takes ages on PyPy |
|
43 | 43 | - os: ubuntu-latest |
|
44 | 44 | python-version: "pypy-3.10" |
|
45 | 45 | deps: test |
|
46 | 46 | - os: windows-latest |
|
47 | 47 | python-version: "pypy-3.10" |
|
48 | 48 | deps: test |
|
49 | 49 | - os: macos-latest |
|
50 | 50 | python-version: "pypy-3.10" |
|
51 | 51 | deps: test |
|
52 | 52 | # Temporary CI run to use entry point compatible code in matplotlib-inline. |
|
53 | 53 | - os: ubuntu-latest |
|
54 | 54 | python-version: "3.12" |
|
55 | 55 | deps: test_extra |
|
56 | 56 | want-latest-entry-point-code: true |
|
57 | 57 | |
|
58 | 58 | steps: |
|
59 | 59 | - uses: actions/checkout@v3 |
|
60 | 60 | - name: Set up Python ${{ matrix.python-version }} |
|
61 | 61 | uses: actions/setup-python@v4 |
|
62 | 62 | with: |
|
63 | 63 | python-version: ${{ matrix.python-version }} |
|
64 | 64 | cache: pip |
|
65 | 65 | cache-dependency-path: | |
|
66 | 66 | pyproject.toml |
|
67 | 67 | - name: Install latex |
|
68 | 68 | if: runner.os == 'Linux' && matrix.deps == 'test_extra' |
|
69 | 69 | 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 |
|
70 | 70 | - name: Install and update Python dependencies (binary only) |
|
71 | 71 | if: ${{ ! contains( matrix.python-version, 'dev' ) }} |
|
72 | 72 | run: | |
|
73 | 73 | python -m pip install --only-binary ':all:' --upgrade pip setuptools wheel build |
|
74 | 74 | python -m pip install --only-binary ':all:' --no-binary curio --upgrade -e .[${{ matrix.deps }}] |
|
75 | 75 | python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest-json-report 'pytest<8' |
|
76 | 76 | - name: Install and update Python dependencies (dev?) |
|
77 | 77 | if: ${{ contains( matrix.python-version, 'dev' ) }} |
|
78 | 78 | run: | |
|
79 | 79 | python -m pip install --pre --upgrade pip setuptools wheel build |
|
80 | 80 | python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-binary curio --upgrade -e .[${{ matrix.deps }}] |
|
81 | 81 | python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --upgrade check-manifest pytest-cov pytest-json-report |
|
82 | python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple git+https://github.com/alexmojaki/executing.git@3.13 | |
|
83 | 82 | - name: Try building with Python build |
|
84 | 83 | if: runner.os != 'Windows' # setup.py does not support sdist on Windows |
|
85 | 84 | run: | |
|
86 | 85 | python -m build |
|
87 | 86 | shasum -a 256 dist/* |
|
88 | 87 | - name: Check manifest |
|
89 | 88 | if: runner.os != 'Windows' # setup.py does not support sdist on Windows |
|
90 | 89 | run: check-manifest |
|
91 | 90 | |
|
92 | 91 | - name: Install entry point compatible code (TEMPORARY) |
|
93 | 92 | if: matrix.want-latest-entry-point-code |
|
94 | 93 | run: | |
|
95 | 94 | python -m pip list |
|
96 | 95 | # Not installing matplotlib's entry point code as building matplotlib from source is complex. |
|
97 | 96 | # Rely upon matplotlib to test all the latest entry point branches together. |
|
98 | 97 | python -m pip install --upgrade git+https://github.com/ipython/matplotlib-inline.git@main |
|
99 | 98 | python -m pip list |
|
100 | 99 | |
|
101 | 100 | - name: pytest |
|
102 | 101 | env: |
|
103 | 102 | COLUMNS: 120 |
|
104 | 103 | run: | |
|
105 | 104 | 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 --maxfail=15 |
|
106 | 105 | - uses: actions/upload-artifact@v3 |
|
107 | 106 | with: |
|
108 | 107 | name: upload pytest timing reports as json |
|
109 | 108 | path: | |
|
110 | 109 | ./report-*.json |
|
111 | 110 | |
|
112 | 111 | - name: Upload coverage to Codecov |
|
113 | 112 | uses: codecov/codecov-action@v3 |
|
114 | 113 | with: |
|
115 | 114 | name: Test |
|
116 | 115 | files: /home/runner/work/ipython/ipython/coverage.xml |
General Comments 0
You need to be logged in to leave comments.
Login now