##// END OF EJS Templates
Refine package caching in GitHub actions. (#13985)
Matthias Bussonnier -
r28178:e26539d6 merge
parent child Browse files
Show More
@@ -1,96 +1,98 b''
1 1 name: Run tests
2 2
3 3 on:
4 4 push:
5 5 branches:
6 6 - main
7 7 - '*.x'
8 8 pull_request:
9 9 # Run weekly on Monday at 1:23 UTC
10 10 schedule:
11 11 - cron: '23 1 * * 1'
12 12 workflow_dispatch:
13 13
14 14
15 15 jobs:
16 16 test:
17 17 runs-on: ${{ matrix.os }}
18 18 strategy:
19 19 fail-fast: false
20 20 matrix:
21 21 os: [ubuntu-latest, windows-latest]
22 22 python-version: ["3.8", "3.9", "3.10", "3.11"]
23 23 deps: [test_extra]
24 24 # Test all on ubuntu, test ends on macos
25 25 include:
26 26 - os: macos-latest
27 27 python-version: "3.8"
28 28 deps: test_extra
29 29 - os: macos-latest
30 30 python-version: "3.11"
31 31 deps: test_extra
32 32 # Tests minimal dependencies set
33 33 - os: ubuntu-latest
34 34 python-version: "3.11"
35 35 deps: test
36 36 # Tests latest development Python version
37 37 - os: ubuntu-latest
38 38 python-version: "3.12-dev"
39 39 deps: test
40 40 # Installing optional dependencies stuff takes ages on PyPy
41 41 - os: ubuntu-latest
42 42 python-version: "pypy-3.8"
43 43 deps: test
44 44 - os: windows-latest
45 45 python-version: "pypy-3.8"
46 46 deps: test
47 47 - os: macos-latest
48 48 python-version: "pypy-3.8"
49 49 deps: test
50 50
51 51 steps:
52 52 - uses: actions/checkout@v3
53 53 - name: Set up Python ${{ matrix.python-version }}
54 54 uses: actions/setup-python@v4
55 55 with:
56 56 python-version: ${{ matrix.python-version }}
57 57 cache: pip
58 cache-dependency-path: |
59 setup.cfg
58 60 - name: Install latex
59 61 if: runner.os == 'Linux' && matrix.deps == 'test_extra'
60 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
61 63 - name: Install and update Python dependencies (binary only)
62 64 if: ${{ ! contains( matrix.python-version, 'dev' ) }}
63 65 run: |
64 66 python -m pip install --only-binary ':all:' --upgrade pip setuptools wheel build
65 67 python -m pip install --only-binary ':all:' --no-binary curio --upgrade -e .[${{ matrix.deps }}]
66 68 python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest-json-report
67 69 - name: Install and update Python dependencies (dev?)
68 70 if: ${{ contains( matrix.python-version, 'dev' ) }}
69 71 run: |
70 72 python -m pip install --pre --upgrade pip setuptools wheel build
71 73 python -m pip install --pre --no-binary curio --upgrade -e .[${{ matrix.deps }}]
72 74 python -m pip install --pre --upgrade check-manifest pytest-cov pytest-json-report
73 75 - name: Try building with Python build
74 76 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
75 77 run: |
76 78 python -m build
77 79 shasum -a 256 dist/*
78 80 - name: Check manifest
79 81 if: runner.os != 'Windows' # setup.py does not support sdist on Windows
80 82 run: check-manifest
81 83 - name: pytest
82 84 env:
83 85 COLUMNS: 120
84 86 run: |
85 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
86 88 - uses: actions/upload-artifact@v3
87 89 with:
88 90 name: upload pytest timing reports as json
89 91 path: |
90 92 ./report-*.json
91 93
92 94 - name: Upload coverage to Codecov
93 95 uses: codecov/codecov-action@v3
94 96 with:
95 97 name: Test
96 98 files: /home/runner/work/ipython/ipython/coverage.xml
General Comments 0
You need to be logged in to leave comments. Login now