##// END OF EJS Templates
CI: update actions version
Brigitta Sipőcz -
Show More
@@ -1,39 +1,39
1 name: Build docs
1 name: Build docs
2
2
3 on: [push, pull_request]
3 on: [push, pull_request]
4
4
5 permissions:
5 permissions:
6 contents: read
6 contents: read
7
7
8 jobs:
8 jobs:
9 build:
9 build:
10 runs-on: ubuntu-latest
10 runs-on: ubuntu-latest
11
11
12 steps:
12 steps:
13 - uses: actions/checkout@v3
13 - uses: actions/checkout@v4
14 - name: Set up Python
14 - name: Set up Python
15 uses: actions/setup-python@v4
15 uses: actions/setup-python@v5
16 with:
16 with:
17 python-version: 3.x
17 python-version: 3.x
18 - name: Install Graphviz
18 - name: Install Graphviz
19 run: |
19 run: |
20 sudo apt-get update
20 sudo apt-get update
21 sudo apt-get install graphviz
21 sudo apt-get install graphviz
22 - name: Install Python dependencies
22 - name: Install Python dependencies
23 run: |
23 run: |
24 python -m pip install --upgrade pip setuptools coverage rstvalidator
24 python -m pip install --upgrade pip setuptools coverage rstvalidator
25 pip install -r docs/requirements.txt
25 pip install -r docs/requirements.txt
26 - name: Build docs
26 - name: Build docs
27 run: |
27 run: |
28 python -m rstvalidator long_description.rst
28 python -m rstvalidator long_description.rst
29 python tools/fixup_whats_new_pr.py
29 python tools/fixup_whats_new_pr.py
30 make -C docs/ html SPHINXOPTS="-W" \
30 make -C docs/ html SPHINXOPTS="-W" \
31 PYTHON="coverage run -a" \
31 PYTHON="coverage run -a" \
32 SPHINXBUILD="coverage run -a -m sphinx.cmd.build"
32 SPHINXBUILD="coverage run -a -m sphinx.cmd.build"
33 - name: Generate coverage xml
33 - name: Generate coverage xml
34 run: |
34 run: |
35 coverage combine `find . -name .coverage\*` && coverage xml
35 coverage combine `find . -name .coverage\*` && coverage xml
36 - name: Upload coverage to Codecov
36 - name: Upload coverage to Codecov
37 uses: codecov/codecov-action@v2
37 uses: codecov/codecov-action@v4
38 with:
38 with:
39 name: Docs
39 name: Docs
@@ -1,73 +1,73
1 name: Run Downstream tests
1 name: Run Downstream tests
2
2
3 on:
3 on:
4 push:
4 push:
5 pull_request:
5 pull_request:
6 # Run weekly on Monday at 1:23 UTC
6 # Run weekly on Monday at 1:23 UTC
7 schedule:
7 schedule:
8 - cron: '23 1 * * 1'
8 - cron: '23 1 * * 1'
9 workflow_dispatch:
9 workflow_dispatch:
10
10
11 permissions:
11 permissions:
12 contents: read
12 contents: read
13
13
14 jobs:
14 jobs:
15 test:
15 test:
16 runs-on: ${{ matrix.os }}
16 runs-on: ${{ matrix.os }}
17 # Disable scheduled CI runs on forks
17 # Disable scheduled CI runs on forks
18 if: github.event_name != 'schedule' || github.repository_owner == 'ipython'
18 if: github.event_name != 'schedule' || github.repository_owner == 'ipython'
19 strategy:
19 strategy:
20 matrix:
20 matrix:
21 os: [ubuntu-latest]
21 os: [ubuntu-latest]
22 python-version: ["3.10"]
22 python-version: ["3.10"]
23 include:
23 include:
24 - os: macos-13
24 - os: macos-13
25 python-version: "3.10"
25 python-version: "3.10"
26
26
27 steps:
27 steps:
28 - uses: actions/checkout@v3
28 - uses: actions/checkout@v4
29 - name: Set up Python ${{ matrix.python-version }}
29 - name: Set up Python ${{ matrix.python-version }}
30 uses: actions/setup-python@v4
30 uses: actions/setup-python@v5
31 with:
31 with:
32 python-version: ${{ matrix.python-version }}
32 python-version: ${{ matrix.python-version }}
33 - name: Update Python installer
33 - name: Update Python installer
34 run: |
34 run: |
35 python -m pip install --upgrade pip setuptools wheel
35 python -m pip install --upgrade pip setuptools wheel
36 - name: Install ipykernel
36 - name: Install ipykernel
37 run: |
37 run: |
38 cd ..
38 cd ..
39 git clone https://github.com/ipython/ipykernel
39 git clone https://github.com/ipython/ipykernel
40 cd ipykernel
40 cd ipykernel
41 pip install -e .[test]
41 pip install -e .[test]
42 cd ..
42 cd ..
43 - name: Install and update Python dependencies
43 - name: Install and update Python dependencies
44 run: |
44 run: |
45 python -m pip install --upgrade -e file://$PWD#egg=ipython[test]
45 python -m pip install --upgrade -e file://$PWD#egg=ipython[test]
46 # we must install IPython after ipykernel to get the right versions.
46 # we must install IPython after ipykernel to get the right versions.
47 python -m pip install --upgrade --upgrade-strategy eager flaky ipyparallel
47 python -m pip install --upgrade --upgrade-strategy eager flaky ipyparallel
48 - name: pytest ipykernel
48 - name: pytest ipykernel
49 env:
49 env:
50 COLUMNS: 120
50 COLUMNS: 120
51 run: |
51 run: |
52 cd ../ipykernel
52 cd ../ipykernel
53 pytest
53 pytest
54 - name: Install sagemath-repl
54 - name: Install sagemath-repl
55 run: |
55 run: |
56 # Sept 2024, sage has been failing for a while,
56 # Sept 2024, sage has been failing for a while,
57 # Skipping.
57 # Skipping.
58 # cd ..
58 # cd ..
59 # git clone --depth 1 https://github.com/sagemath/sage
59 # git clone --depth 1 https://github.com/sagemath/sage
60 # cd sage
60 # cd sage
61 # # We cloned it for the tests, but for simplicity we install the
61 # # We cloned it for the tests, but for simplicity we install the
62 # # wheels from PyPI.
62 # # wheels from PyPI.
63 # # (Avoid 10.3b6 because of https://github.com/sagemath/sage/pull/37178)
63 # # (Avoid 10.3b6 because of https://github.com/sagemath/sage/pull/37178)
64 # pip install --pre sagemath-repl sagemath-environment
64 # pip install --pre sagemath-repl sagemath-environment
65 # # Install optionals that make more tests pass
65 # # Install optionals that make more tests pass
66 # pip install pillow
66 # pip install pillow
67 # pip install --pre sagemath-categories
67 # pip install --pre sagemath-categories
68 # cd ..
68 # cd ..
69 - name: Test sagemath-repl
69 - name: Test sagemath-repl
70 run: |
70 run: |
71 # cd ../sage/
71 # cd ../sage/
72 # # From https://github.com/sagemath/sage/blob/develop/pkgs/sagemath-repl/tox.ini
72 # # From https://github.com/sagemath/sage/blob/develop/pkgs/sagemath-repl/tox.ini
73 # sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path=pkgs/sagemath-repl/known-test-failures.json --initial --optional=sage src/sage/repl src/sage/doctest src/sage/misc/sage_input.py src/sage/misc/sage_eval.py
73 # sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path=pkgs/sagemath-repl/known-test-failures.json --initial --optional=sage src/sage/repl src/sage/doctest src/sage/misc/sage_input.py src/sage/misc/sage_eval.py
@@ -1,38 +1,38
1 name: Run MyPy
1 name: Run MyPy
2
2
3 on:
3 on:
4 push:
4 push:
5 branches: [ main, 7.x]
5 branches: [ main, 7.x]
6 pull_request:
6 pull_request:
7 branches: [ main, 7.x]
7 branches: [ main, 7.x]
8
8
9 permissions:
9 permissions:
10 contents: read
10 contents: read
11
11
12 jobs:
12 jobs:
13 build:
13 build:
14
14
15 runs-on: ubuntu-latest
15 runs-on: ubuntu-latest
16 strategy:
16 strategy:
17 matrix:
17 matrix:
18 python-version: ["3.x"]
18 python-version: ["3.x"]
19
19
20 steps:
20 steps:
21 - uses: actions/checkout@v3
21 - uses: actions/checkout@v4
22 - name: Set up Python ${{ matrix.python-version }}
22 - name: Set up Python ${{ matrix.python-version }}
23 uses: actions/setup-python@v4
23 uses: actions/setup-python@v5
24 with:
24 with:
25 python-version: ${{ matrix.python-version }}
25 python-version: ${{ matrix.python-version }}
26 - name: Install dependencies
26 - name: Install dependencies
27 run: |
27 run: |
28 python -m pip install --upgrade pip
28 python -m pip install --upgrade pip
29 pip install mypy pyflakes flake8 types-decorator
29 pip install mypy pyflakes flake8 types-decorator
30 - name: Lint with mypy
30 - name: Lint with mypy
31 run: |
31 run: |
32 set -e
32 set -e
33 mypy IPython
33 mypy IPython
34 - name: Lint with pyflakes
34 - name: Lint with pyflakes
35 run: |
35 run: |
36 set -e
36 set -e
37 flake8 IPython/core/magics/script.py
37 flake8 IPython/core/magics/script.py
38 flake8 IPython/core/magics/packaging.py
38 flake8 IPython/core/magics/packaging.py
@@ -1,34 +1,34
1 name: Nightly Wheel builder
1 name: Nightly Wheel builder
2 on:
2 on:
3 workflow_dispatch:
3 workflow_dispatch:
4 schedule:
4 schedule:
5 # this cron is ran every Sunday at midnight UTC
5 # this cron is ran every Sunday at midnight UTC
6 - cron: '0 0 * * 0'
6 - cron: '0 0 * * 0'
7
7
8 jobs:
8 jobs:
9 upload_anaconda:
9 upload_anaconda:
10 name: Upload to Anaconda
10 name: Upload to Anaconda
11 runs-on: ubuntu-latest
11 runs-on: ubuntu-latest
12 # The artifacts cannot be uploaded on PRs, also disable scheduled CI runs on forks
12 # The artifacts cannot be uploaded on PRs, also disable scheduled CI runs on forks
13 if: github.event_name != 'pull_request' && (github.event_name != 'schedule' || github.repository_owner == 'ipython')
13 if: github.event_name != 'pull_request' && (github.event_name != 'schedule' || github.repository_owner == 'ipython')
14
14
15 steps:
15 steps:
16 - uses: actions/checkout@v3
16 - uses: actions/checkout@v4
17 - name: Set up Python
17 - name: Set up Python
18 uses: actions/setup-python@v4
18 uses: actions/setup-python@v5
19 with:
19 with:
20 python-version: "3.10"
20 python-version: "3.10"
21 cache: pip
21 cache: pip
22 cache-dependency-path: |
22 cache-dependency-path: |
23 pyproject.toml
23 pyproject.toml
24 - name: Try building with Python build
24 - name: Try building with Python build
25 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
25 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
26 run: |
26 run: |
27 python -m pip install build
27 python -m pip install build
28 python -m build
28 python -m build
29
29
30 - name: Upload wheel
30 - name: Upload wheel
31 uses: scientific-python/upload-nightly-action@main
31 uses: scientific-python/upload-nightly-action@main
32 with:
32 with:
33 artifacts_path: dist
33 artifacts_path: dist
34 anaconda_nightly_upload_token: ${{secrets.UPLOAD_TOKEN}}
34 anaconda_nightly_upload_token: ${{secrets.UPLOAD_TOKEN}}
@@ -1,40 +1,40
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
3
4 name: Python package
4 name: Python package
5
5
6 permissions:
6 permissions:
7 contents: read
7 contents: read
8
8
9 on:
9 on:
10 push:
10 push:
11 branches: [ main, 7.x ]
11 branches: [ main, 7.x ]
12 pull_request:
12 pull_request:
13 branches: [ main, 7.x ]
13 branches: [ main, 7.x ]
14
14
15 jobs:
15 jobs:
16 formatting:
16 formatting:
17
17
18 runs-on: ubuntu-latest
18 runs-on: ubuntu-latest
19 timeout-minutes: 5
19 timeout-minutes: 5
20 steps:
20 steps:
21 - uses: actions/checkout@v3
21 - uses: actions/checkout@v4
22 with:
22 with:
23 fetch-depth: 0
23 fetch-depth: 0
24 - name: Set up Python
24 - name: Set up Python
25 uses: actions/setup-python@v4
25 uses: actions/setup-python@v5
26 with:
26 with:
27 python-version: 3.x
27 python-version: 3.x
28 - name: Install dependencies
28 - name: Install dependencies
29 run: |
29 run: |
30 python -m pip install --upgrade pip
30 python -m pip install --upgrade pip
31 # when changing the versions please update CONTRIBUTING.md too
31 # when changing the versions please update CONTRIBUTING.md too
32 pip install --only-binary ':all:' darker==1.5.1 black==22.10.0
32 pip install --only-binary ':all:' darker==1.5.1 black==22.10.0
33 - name: Lint with darker
33 - name: Lint with darker
34 run: |
34 run: |
35 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
35 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
36 echo "Changes need auto-formatting. Run:"
36 echo "Changes need auto-formatting. Run:"
37 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522 ."
37 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522 ."
38 echo "then commit and push changes to fix."
38 echo "then commit and push changes to fix."
39 exit 1
39 exit 1
40 )
40 )
@@ -1,115 +1,115
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@v3
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@v4
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 pytest-json-report 'pytest<8'
75 python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest-json-report '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 pytest-json-report
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 - 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' }} --json-report --json-report-file=./report-${{ matrix.python-version }}-${{runner.os}}.json --maxfail=15
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
105 - uses: actions/upload-artifact@v3
105 - uses: actions/upload-artifact@v4
106 with:
106 with:
107 name: upload pytest timing reports as json
107 name: upload pytest timing reports as json
108 path: |
108 path: |
109 ./report-*.json
109 ./report-*.json
110
110
111 - name: Upload coverage to Codecov
111 - name: Upload coverage to Codecov
112 uses: codecov/codecov-action@v3
112 uses: codecov/codecov-action@v4
113 with:
113 with:
114 name: Test
114 name: Test
115 files: /home/runner/work/ipython/ipython/coverage.xml
115 files: /home/runner/work/ipython/ipython/coverage.xml
General Comments 0
You need to be logged in to leave comments. Login now