forked from ipython/ipython
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (102 loc) · 4.34 KB
/
Copy pathmix_order.yml
File metadata and controls
106 lines (102 loc) · 4.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: mix_order
on:
push:
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] #[ubuntu-latest, windows-latest]
python-version: ["3.12"] # ["3.10", "3.11", "3.12"]
deps: [test_extra]
# Test all on ubuntu, test ends on macos
# include:
# - os: macos-latest
# python-version: "3.10"
# deps: test_extra
# - os: macos-latest
# python-version: "3.11"
# deps: test_extra
# # Tests minimal dependencies set
# - os: ubuntu-latest
# python-version: "3.11"
# deps: test
# # Tests latest development Python version
# # - os: ubuntu-latest
# # python-version: "3.13-dev"
# # deps: test
# # Installing optional dependencies stuff takes ages on PyPy
# - os: ubuntu-latest
# python-version: "pypy-3.10"
# deps: test
# - os: windows-latest
# python-version: "pypy-3.10"
# deps: test
# - os: macos-latest
# python-version: "pypy-3.10"
# deps: test
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
pyproject.toml
- name: Install latex
if: runner.os == 'Linux' && matrix.deps == 'test_extra'
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
- name: Install and update Python dependencies (binary only)
if: ${{ ! contains( matrix.python-version, 'dev' ) }}
run: |
python -m pip install --only-binary ':all:' --upgrade pip setuptools wheel build
python -m pip install --only-binary ':all:' --no-binary curio --upgrade -e .[${{ matrix.deps }}]
python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest-json-report 'pytest<8'
- name: Install and update Python dependencies (dev?)
if: ${{ contains( matrix.python-version, 'dev' ) }}
run: |
python -m pip install --pre --upgrade pip setuptools wheel build
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-binary curio --upgrade -e .[${{ matrix.deps }}]
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
- name: Try building with Python build
if: runner.os != 'Windows' # setup.py does not support sdist on Windows
run: |
python -m build
shasum -a 256 dist/*
- name: Check manifest
if: runner.os != 'Windows' # setup.py does not support sdist on Windows
run: check-manifest
- name: Install pytest-ranking
run: pip install pytest-ranking
- name: Restore pytest-ranking cache
id: restore-pytest-ranking-cache
if: always()
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/.pytest_cache/v/pytest_ranking_data
key: pytest-ranking-cache-${{ github.workflow }}-${{ runner.os }}-${{ matrix.python }}
- name: pytest
env:
COLUMNS: 120
run: |
pytest -v -r x --durations=0 --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} --json-report --json-report-file=./report-${{ matrix.python-version }}-${{runner.os}}.json --rank --rank-weight=1-1-1
- name: Save pytest-ranking cache
id: save-pytest-ranking-cache
if: always()
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/.pytest_cache/v/pytest_ranking_data
key: pytest-ranking-cache-${{ github.workflow }}-${{ runner.os }}-${{ matrix.python }}-${{ github.run_id }}
- uses: actions/upload-artifact@v3
with:
name: upload pytest timing reports as json
path: |
./report-*.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Test
files: /home/runner/work/ipython/ipython/coverage.xml