##// END OF EJS Templates
Merge pull request #13738 from cclauss/patch-1...
Matthias Bussonnier -
r27729:de0cf60d merge
parent child Browse files
Show More
@@ -1,36 +1,36
1 name: Build docs
1 name: Build docs
2
2
3 on: [push, pull_request]
3 on: [push, pull_request]
4
4
5 jobs:
5 jobs:
6 build:
6 build:
7 runs-on: ubuntu-latest
7 runs-on: ubuntu-latest
8
8
9 steps:
9 steps:
10 - uses: actions/checkout@v2
10 - uses: actions/checkout@v3
11 - name: Set up Python 3.8
11 - name: Set up Python
12 uses: actions/setup-python@v2
12 uses: actions/setup-python@v4
13 with:
13 with:
14 python-version: 3.8
14 python-version: 3.x
15 - name: Install Graphviz
15 - name: Install Graphviz
16 run: |
16 run: |
17 sudo apt-get update
17 sudo apt-get update
18 sudo apt-get install graphviz
18 sudo apt-get install graphviz
19 - name: Install Python dependencies
19 - name: Install Python dependencies
20 run: |
20 run: |
21 python -m pip install --upgrade pip setuptools coverage rstvalidator
21 python -m pip install --upgrade pip setuptools coverage rstvalidator
22 pip install -r docs/requirements.txt
22 pip install -r docs/requirements.txt
23 - name: Build docs
23 - name: Build docs
24 run: |
24 run: |
25 python -m rstvalidator long_description.rst
25 python -m rstvalidator long_description.rst
26 python tools/fixup_whats_new_pr.py
26 python tools/fixup_whats_new_pr.py
27 make -C docs/ html SPHINXOPTS="-W" \
27 make -C docs/ html SPHINXOPTS="-W" \
28 PYTHON="coverage run -a" \
28 PYTHON="coverage run -a" \
29 SPHINXBUILD="coverage run -a -m sphinx.cmd.build"
29 SPHINXBUILD="coverage run -a -m sphinx.cmd.build"
30 - name: Generate coverage xml
30 - name: Generate coverage xml
31 run: |
31 run: |
32 coverage combine `find . -name .coverage\*` && coverage xml
32 coverage combine `find . -name .coverage\*` && coverage xml
33 - name: Upload coverage to Codecov
33 - name: Upload coverage to Codecov
34 uses: codecov/codecov-action@v2
34 uses: codecov/codecov-action@v2
35 with:
35 with:
36 name: Docs
36 name: Docs
@@ -1,50 +1,50
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
11
12 jobs:
12 jobs:
13 test:
13 test:
14 runs-on: ${{ matrix.os }}
14 runs-on: ${{ matrix.os }}
15 strategy:
15 strategy:
16 matrix:
16 matrix:
17 os: [ubuntu-latest]
17 os: [ubuntu-latest]
18 python-version: ["3.9"]
18 python-version: ["3.9"]
19 include:
19 include:
20 - os: macos-latest
20 - os: macos-latest
21 python-version: "3.9"
21 python-version: "3.9"
22
22
23 steps:
23 steps:
24 - uses: actions/checkout@v2
24 - uses: actions/checkout@v3
25 - name: Set up Python ${{ matrix.python-version }}
25 - name: Set up Python ${{ matrix.python-version }}
26 uses: actions/setup-python@v2
26 uses: actions/setup-python@v4
27 with:
27 with:
28 python-version: ${{ matrix.python-version }}
28 python-version: ${{ matrix.python-version }}
29 - name: Update Python installer
29 - name: Update Python installer
30 run: |
30 run: |
31 python -m pip install --upgrade pip setuptools wheel
31 python -m pip install --upgrade pip setuptools wheel
32 - name: Install ipykernel
32 - name: Install ipykernel
33 run: |
33 run: |
34 cd ..
34 cd ..
35 git clone https://github.com/ipython/ipykernel
35 git clone https://github.com/ipython/ipykernel
36 cd ipykernel
36 cd ipykernel
37 pip install -e .[test]
37 pip install -e .[test]
38 cd ..
38 cd ..
39 - name: Install and update Python dependencies
39 - name: Install and update Python dependencies
40 run: |
40 run: |
41 python -m pip install --upgrade -e file://$PWD#egg=ipython[test]
41 python -m pip install --upgrade -e file://$PWD#egg=ipython[test]
42 # we must install IPython after ipykernel to get the right versions.
42 # we must install IPython after ipykernel to get the right versions.
43 python -m pip install --upgrade --upgrade-strategy eager flaky ipyparallel
43 python -m pip install --upgrade --upgrade-strategy eager flaky ipyparallel
44 python -m pip install --upgrade 'pytest<7'
44 python -m pip install --upgrade 'pytest<7'
45 - name: pytest
45 - name: pytest
46 env:
46 env:
47 COLUMNS: 120
47 COLUMNS: 120
48 run: |
48 run: |
49 cd ../ipykernel
49 cd ../ipykernel
50 pytest
50 pytest
@@ -1,34 +1,34
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 jobs:
9 jobs:
10 build:
10 build:
11
11
12 runs-on: ubuntu-latest
12 runs-on: ubuntu-latest
13 strategy:
13 strategy:
14 matrix:
14 matrix:
15 python-version: [3.8]
15 python-version: [3.8]
16
16
17 steps:
17 steps:
18 - uses: actions/checkout@v2
18 - uses: actions/checkout@v3
19 - name: Set up Python ${{ matrix.python-version }}
19 - name: Set up Python ${{ matrix.python-version }}
20 uses: actions/setup-python@v2
20 uses: actions/setup-python@v4
21 with:
21 with:
22 python-version: ${{ matrix.python-version }}
22 python-version: ${{ matrix.python-version }}
23 - name: Install dependencies
23 - name: Install dependencies
24 run: |
24 run: |
25 python -m pip install --upgrade pip
25 python -m pip install --upgrade pip
26 pip install mypy pyflakes flake8
26 pip install mypy pyflakes flake8
27 - name: Lint with mypy
27 - name: Lint with mypy
28 run: |
28 run: |
29 mypy -p IPython.terminal
29 mypy -p IPython.terminal
30 mypy -p IPython.core.magics
30 mypy -p IPython.core.magics
31 - name: Lint with pyflakes
31 - name: Lint with pyflakes
32 run: |
32 run: |
33 flake8 IPython/core/magics/script.py
33 flake8 IPython/core/magics/script.py
34 flake8 IPython/core/magics/packaging.py
34 flake8 IPython/core/magics/packaging.py
@@ -1,40 +1,36
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 on:
6 on:
7 push:
7 push:
8 branches: [ main, 7.x ]
8 branches: [ main, 7.x ]
9 pull_request:
9 pull_request:
10 branches: [ main, 7.x ]
10 branches: [ main, 7.x ]
11
11
12 jobs:
12 jobs:
13 formatting:
13 formatting:
14
14
15 runs-on: ubuntu-latest
15 runs-on: ubuntu-latest
16 timeout-minutes: 5
16 timeout-minutes: 5
17 strategy:
18 matrix:
19 python-version: [3.8]
20
21 steps:
17 steps:
22 - uses: actions/checkout@v2
18 - uses: actions/checkout@v3
23 with:
19 with:
24 fetch-depth: 0
20 fetch-depth: 0
25 - name: Set up Python ${{ matrix.python-version }}
21 - name: Set up Python
26 uses: actions/setup-python@v2
22 uses: actions/setup-python@v4
27 with:
23 with:
28 python-version: ${{ matrix.python-version }}
24 python-version: 3.x
29 - name: Install dependencies
25 - name: Install dependencies
30 run: |
26 run: |
31 python -m pip install --upgrade pip
27 python -m pip install --upgrade pip
32 pip install darker black==21.12b0
28 pip install darker black==21.12b0
33 - name: Lint with darker
29 - name: Lint with darker
34 run: |
30 run: |
35 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
31 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
36 echo "Changes need auto-formatting. Run:"
32 echo "Changes need auto-formatting. Run:"
37 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522"
33 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522"
38 echo "then commit and push changes to fix."
34 echo "then commit and push changes to fix."
39 exit 1
35 exit 1
40 )
36 )
@@ -1,80 +1,80
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 strategy:
18 strategy:
19 fail-fast: false
19 fail-fast: false
20 matrix:
20 matrix:
21 os: [ubuntu-latest, windows-latest]
21 os: [ubuntu-latest, windows-latest]
22 python-version: ["3.8", "3.9", "3.10"]
22 python-version: ["3.8", "3.9", "3.10"]
23 deps: [test_extra]
23 deps: [test_extra]
24 # Test all on ubuntu, test ends on macos
24 # Test all on ubuntu, test ends on macos
25 include:
25 include:
26 - os: macos-latest
26 - os: macos-latest
27 python-version: "3.8"
27 python-version: "3.8"
28 deps: test_extra
28 deps: test_extra
29 - os: macos-latest
29 - os: macos-latest
30 python-version: "3.10"
30 python-version: "3.10"
31 deps: test_extra
31 deps: test_extra
32 # Tests minimal dependencies set
32 # Tests minimal dependencies set
33 - os: ubuntu-latest
33 - os: ubuntu-latest
34 python-version: "3.10"
34 python-version: "3.10"
35 deps: test
35 deps: test
36 # Tests latest development Python version
36 # Tests latest development Python version
37 - os: ubuntu-latest
37 - os: ubuntu-latest
38 python-version: "3.11-dev"
38 python-version: "3.11-dev"
39 deps: test
39 deps: test
40 # Installing optional dependencies stuff takes ages on PyPy
40 # Installing optional dependencies stuff takes ages on PyPy
41 - os: ubuntu-latest
41 - os: ubuntu-latest
42 python-version: "pypy-3.8"
42 python-version: "pypy-3.8"
43 deps: test
43 deps: test
44 - os: windows-latest
44 - os: windows-latest
45 python-version: "pypy-3.8"
45 python-version: "pypy-3.8"
46 deps: test
46 deps: test
47 - os: macos-latest
47 - os: macos-latest
48 python-version: "pypy-3.8"
48 python-version: "pypy-3.8"
49 deps: test
49 deps: test
50
50
51 steps:
51 steps:
52 - uses: actions/checkout@v2
52 - uses: actions/checkout@v3
53 - name: Set up Python ${{ matrix.python-version }}
53 - name: Set up Python ${{ matrix.python-version }}
54 uses: actions/setup-python@v2
54 uses: actions/setup-python@v4
55 with:
55 with:
56 python-version: ${{ matrix.python-version }}
56 python-version: ${{ matrix.python-version }}
57 cache: pip
57 cache: pip
58 - name: Install latex
58 - name: Install latex
59 if: runner.os == 'Linux' && matrix.deps == 'test_extra'
59 if: runner.os == 'Linux' && matrix.deps == 'test_extra'
60 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
60 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
61 - name: Install and update Python dependencies
61 - name: Install and update Python dependencies
62 run: |
62 run: |
63 python -m pip install --upgrade pip setuptools wheel build
63 python -m pip install --upgrade pip setuptools wheel build
64 python -m pip install --upgrade -e .[${{ matrix.deps }}]
64 python -m pip install --upgrade -e .[${{ matrix.deps }}]
65 python -m pip install --upgrade check-manifest pytest-cov
65 python -m pip install --upgrade check-manifest pytest-cov
66 - name: Try building with Python build
66 - name: Try building with Python build
67 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
67 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
68 run: |
68 run: |
69 python -m build
69 python -m build
70 shasum -a 256 dist/*
70 shasum -a 256 dist/*
71 - name: Check manifest
71 - name: Check manifest
72 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
72 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
73 run: check-manifest
73 run: check-manifest
74 - name: pytest
74 - name: pytest
75 env:
75 env:
76 COLUMNS: 120
76 COLUMNS: 120
77 run: |
77 run: |
78 pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }}
78 pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }}
79 - name: Upload coverage to Codecov
79 - name: Upload coverage to Codecov
80 uses: codecov/codecov-action@v2
80 uses: codecov/codecov-action@v2
General Comments 0
You need to be logged in to leave comments. Login now