##// END OF EJS Templates
Merge pull request #13750 from Carreau/sec-2...
Matthias Bussonnier -
r27791:4f6e132d merge
parent child Browse files
Show More
@@ -1,36 +1,39 b''
1 name: Build docs
1 name: Build docs
2
2
3 on: [push, pull_request]
3 on: [push, pull_request]
4
4
5 permissions:
6 contents: read
7
5 jobs:
8 jobs:
6 build:
9 build:
7 runs-on: ubuntu-latest
10 runs-on: ubuntu-latest
8
11
9 steps:
12 steps:
10 - uses: actions/checkout@v3
13 - uses: actions/checkout@v3
11 - name: Set up Python
14 - name: Set up Python
12 uses: actions/setup-python@v4
15 uses: actions/setup-python@v4
13 with:
16 with:
14 python-version: 3.x
17 python-version: 3.x
15 - name: Install Graphviz
18 - name: Install Graphviz
16 run: |
19 run: |
17 sudo apt-get update
20 sudo apt-get update
18 sudo apt-get install graphviz
21 sudo apt-get install graphviz
19 - name: Install Python dependencies
22 - name: Install Python dependencies
20 run: |
23 run: |
21 python -m pip install --upgrade pip setuptools coverage rstvalidator
24 python -m pip install --upgrade pip setuptools coverage rstvalidator
22 pip install -r docs/requirements.txt
25 pip install -r docs/requirements.txt
23 - name: Build docs
26 - name: Build docs
24 run: |
27 run: |
25 python -m rstvalidator long_description.rst
28 python -m rstvalidator long_description.rst
26 python tools/fixup_whats_new_pr.py
29 python tools/fixup_whats_new_pr.py
27 make -C docs/ html SPHINXOPTS="-W" \
30 make -C docs/ html SPHINXOPTS="-W" \
28 PYTHON="coverage run -a" \
31 PYTHON="coverage run -a" \
29 SPHINXBUILD="coverage run -a -m sphinx.cmd.build"
32 SPHINXBUILD="coverage run -a -m sphinx.cmd.build"
30 - name: Generate coverage xml
33 - name: Generate coverage xml
31 run: |
34 run: |
32 coverage combine `find . -name .coverage\*` && coverage xml
35 coverage combine `find . -name .coverage\*` && coverage xml
33 - name: Upload coverage to Codecov
36 - name: Upload coverage to Codecov
34 uses: codecov/codecov-action@v2
37 uses: codecov/codecov-action@v2
35 with:
38 with:
36 name: Docs
39 name: Docs
@@ -1,50 +1,52 b''
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:
12 contents: read
11
13
12 jobs:
14 jobs:
13 test:
15 test:
14 runs-on: ${{ matrix.os }}
16 runs-on: ${{ matrix.os }}
15 strategy:
17 strategy:
16 matrix:
18 matrix:
17 os: [ubuntu-latest]
19 os: [ubuntu-latest]
18 python-version: ["3.9"]
20 python-version: ["3.9"]
19 include:
21 include:
20 - os: macos-latest
22 - os: macos-latest
21 python-version: "3.9"
23 python-version: "3.9"
22
24
23 steps:
25 steps:
24 - uses: actions/checkout@v3
26 - uses: actions/checkout@v3
25 - name: Set up Python ${{ matrix.python-version }}
27 - name: Set up Python ${{ matrix.python-version }}
26 uses: actions/setup-python@v4
28 uses: actions/setup-python@v4
27 with:
29 with:
28 python-version: ${{ matrix.python-version }}
30 python-version: ${{ matrix.python-version }}
29 - name: Update Python installer
31 - name: Update Python installer
30 run: |
32 run: |
31 python -m pip install --upgrade pip setuptools wheel
33 python -m pip install --upgrade pip setuptools wheel
32 - name: Install ipykernel
34 - name: Install ipykernel
33 run: |
35 run: |
34 cd ..
36 cd ..
35 git clone https://github.com/ipython/ipykernel
37 git clone https://github.com/ipython/ipykernel
36 cd ipykernel
38 cd ipykernel
37 pip install -e .[test]
39 pip install -e .[test]
38 cd ..
40 cd ..
39 - name: Install and update Python dependencies
41 - name: Install and update Python dependencies
40 run: |
42 run: |
41 python -m pip install --upgrade -e file://$PWD#egg=ipython[test]
43 python -m pip install --upgrade -e file://$PWD#egg=ipython[test]
42 # we must install IPython after ipykernel to get the right versions.
44 # we must install IPython after ipykernel to get the right versions.
43 python -m pip install --upgrade --upgrade-strategy eager flaky ipyparallel
45 python -m pip install --upgrade --upgrade-strategy eager flaky ipyparallel
44 python -m pip install --upgrade 'pytest<7'
46 python -m pip install --upgrade 'pytest<7'
45 - name: pytest
47 - name: pytest
46 env:
48 env:
47 COLUMNS: 120
49 COLUMNS: 120
48 run: |
50 run: |
49 cd ../ipykernel
51 cd ../ipykernel
50 pytest
52 pytest
@@ -1,34 +1,37 b''
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:
10 contents: read
11
9 jobs:
12 jobs:
10 build:
13 build:
11
14
12 runs-on: ubuntu-latest
15 runs-on: ubuntu-latest
13 strategy:
16 strategy:
14 matrix:
17 matrix:
15 python-version: [3.8]
18 python-version: [3.8]
16
19
17 steps:
20 steps:
18 - uses: actions/checkout@v3
21 - uses: actions/checkout@v3
19 - name: Set up Python ${{ matrix.python-version }}
22 - name: Set up Python ${{ matrix.python-version }}
20 uses: actions/setup-python@v4
23 uses: actions/setup-python@v4
21 with:
24 with:
22 python-version: ${{ matrix.python-version }}
25 python-version: ${{ matrix.python-version }}
23 - name: Install dependencies
26 - name: Install dependencies
24 run: |
27 run: |
25 python -m pip install --upgrade pip
28 python -m pip install --upgrade pip
26 pip install mypy pyflakes flake8
29 pip install mypy pyflakes flake8
27 - name: Lint with mypy
30 - name: Lint with mypy
28 run: |
31 run: |
29 mypy -p IPython.terminal
32 mypy -p IPython.terminal
30 mypy -p IPython.core.magics
33 mypy -p IPython.core.magics
31 - name: Lint with pyflakes
34 - name: Lint with pyflakes
32 run: |
35 run: |
33 flake8 IPython/core/magics/script.py
36 flake8 IPython/core/magics/script.py
34 flake8 IPython/core/magics/packaging.py
37 flake8 IPython/core/magics/packaging.py
@@ -1,36 +1,39 b''
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:
7 contents: read
8
6 on:
9 on:
7 push:
10 push:
8 branches: [ main, 7.x ]
11 branches: [ main, 7.x ]
9 pull_request:
12 pull_request:
10 branches: [ main, 7.x ]
13 branches: [ main, 7.x ]
11
14
12 jobs:
15 jobs:
13 formatting:
16 formatting:
14
17
15 runs-on: ubuntu-latest
18 runs-on: ubuntu-latest
16 timeout-minutes: 5
19 timeout-minutes: 5
17 steps:
20 steps:
18 - uses: actions/checkout@v3
21 - uses: actions/checkout@v3
19 with:
22 with:
20 fetch-depth: 0
23 fetch-depth: 0
21 - name: Set up Python
24 - name: Set up Python
22 uses: actions/setup-python@v4
25 uses: actions/setup-python@v4
23 with:
26 with:
24 python-version: 3.x
27 python-version: 3.x
25 - name: Install dependencies
28 - name: Install dependencies
26 run: |
29 run: |
27 python -m pip install --upgrade pip
30 python -m pip install --upgrade pip
28 pip install darker black==21.12b0
31 pip install darker black==21.12b0
29 - name: Lint with darker
32 - name: Lint with darker
30 run: |
33 run: |
31 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
34 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
32 echo "Changes need auto-formatting. Run:"
35 echo "Changes need auto-formatting. Run:"
33 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522"
36 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522"
34 echo "then commit and push changes to fix."
37 echo "then commit and push changes to fix."
35 exit 1
38 exit 1
36 )
39 )
General Comments 0
You need to be logged in to leave comments. Login now