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