##// END OF EJS Templates
.github/workflows: Update actions/setup-python cache-dependency-path
Matthias Koeppe -
Show More
@@ -1,34 +1,34 b''
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
12 # The artifacts cannot be uploaded on PRs
13 if: github.event_name != 'pull_request'
13 if: github.event_name != 'pull_request'
14
14
15 steps:
15 steps:
16 - uses: actions/checkout@v3
16 - uses: actions/checkout@v3
17 - name: Set up Python
17 - name: Set up Python
18 uses: actions/setup-python@v4
18 uses: actions/setup-python@v4
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 setup.cfg
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,98 +1,98 b''
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.10", "3.11", "3.12"]
22 python-version: ["3.10", "3.11", "3.12"]
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.10"
27 python-version: "3.10"
28 deps: test_extra
28 deps: test_extra
29 - os: macos-latest
29 - os: macos-latest
30 python-version: "3.11"
30 python-version: "3.11"
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.11"
34 python-version: "3.11"
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.13-dev"
38 python-version: "3.13-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.10"
42 python-version: "pypy-3.10"
43 deps: test
43 deps: test
44 - os: windows-latest
44 - os: windows-latest
45 python-version: "pypy-3.10"
45 python-version: "pypy-3.10"
46 deps: test
46 deps: test
47 - os: macos-latest
47 - os: macos-latest
48 python-version: "pypy-3.10"
48 python-version: "pypy-3.10"
49 deps: test
49 deps: test
50
50
51 steps:
51 steps:
52 - uses: actions/checkout@v3
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@v4
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 cache-dependency-path: |
58 cache-dependency-path: |
59 setup.cfg
59 pyproject.toml
60 - name: Install latex
60 - name: Install latex
61 if: runner.os == 'Linux' && matrix.deps == 'test_extra'
61 if: runner.os == 'Linux' && matrix.deps == 'test_extra'
62 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
62 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
63 - name: Install and update Python dependencies (binary only)
63 - name: Install and update Python dependencies (binary only)
64 if: ${{ ! contains( matrix.python-version, 'dev' ) }}
64 if: ${{ ! contains( matrix.python-version, 'dev' ) }}
65 run: |
65 run: |
66 python -m pip install --only-binary ':all:' --upgrade pip setuptools wheel build
66 python -m pip install --only-binary ':all:' --upgrade pip setuptools wheel build
67 python -m pip install --only-binary ':all:' --no-binary curio --upgrade -e .[${{ matrix.deps }}]
67 python -m pip install --only-binary ':all:' --no-binary curio --upgrade -e .[${{ matrix.deps }}]
68 python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest-json-report 'pytest<8'
68 python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest-json-report 'pytest<8'
69 - name: Install and update Python dependencies (dev?)
69 - name: Install and update Python dependencies (dev?)
70 if: ${{ contains( matrix.python-version, 'dev' ) }}
70 if: ${{ contains( matrix.python-version, 'dev' ) }}
71 run: |
71 run: |
72 python -m pip install --pre --upgrade pip setuptools wheel build
72 python -m pip install --pre --upgrade pip setuptools wheel build
73 python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-binary curio --upgrade -e .[${{ matrix.deps }}]
73 python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-binary curio --upgrade -e .[${{ matrix.deps }}]
74 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
74 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
75 - name: Try building with Python build
75 - name: Try building with Python build
76 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
76 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
77 run: |
77 run: |
78 python -m build
78 python -m build
79 shasum -a 256 dist/*
79 shasum -a 256 dist/*
80 - name: Check manifest
80 - name: Check manifest
81 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
81 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
82 run: check-manifest
82 run: check-manifest
83 - name: pytest
83 - name: pytest
84 env:
84 env:
85 COLUMNS: 120
85 COLUMNS: 120
86 run: |
86 run: |
87 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
87 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
88 - uses: actions/upload-artifact@v3
88 - uses: actions/upload-artifact@v3
89 with:
89 with:
90 name: upload pytest timing reports as json
90 name: upload pytest timing reports as json
91 path: |
91 path: |
92 ./report-*.json
92 ./report-*.json
93
93
94 - name: Upload coverage to Codecov
94 - name: Upload coverage to Codecov
95 uses: codecov/codecov-action@v3
95 uses: codecov/codecov-action@v3
96 with:
96 with:
97 name: Test
97 name: Test
98 files: /home/runner/work/ipython/ipython/coverage.xml
98 files: /home/runner/work/ipython/ipython/coverage.xml
General Comments 0
You need to be logged in to leave comments. Login now