forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 1
135 lines (131 loc) · 3.92 KB
/
test.yml
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Tests
on:
push:
branches: [master, 'release*']
tags: ['*']
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.rst'
- '**/*.md'
- .gitignore
- CREDITS
- LICENSE
jobs:
main:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Test suite with py37-windows-32
python: '3.7'
arch: x86
os: windows-latest
toxenv: py37
- name: Test suite with py37-windows-64
python: '3.7'
arch: x64
os: windows-latest
toxenv: py37
- name: Test suite with py37-ubuntu
python: '3.7'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
- name: Test suite with py38-ubuntu
python: '3.8'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
- name: Test suite with py36-ubuntu, mypyc-compiled
python: '3.6'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
test_mypyc: true
- name: Test suite with py39-ubuntu, mypyc-compiled
python: '3.9'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
test_mypyc: true
- name: Test suite with py310-ubuntu
python: '3.10'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
- name: mypyc runtime tests with py36-macos
python: '3.6'
arch: x64
os: macos-latest
toxenv: py
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
- name: mypyc runtime tests with py36-debug-build-ubuntu
python: '3.6.8'
arch: x64
os: ubuntu-latest
toxenv: py36
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
debug_build: true
- name: Type check our own code
python: '3.7'
arch: x64
os: ubuntu-latest
toxenv: type
- name: Code style with flake8
python: '3.7'
arch: x64
os: ubuntu-latest
toxenv: lint
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
- name: Debug build
if: ${{ matrix.debug_build }}
run: |
PYTHONVERSION=${{ matrix.python }}
PYTHONDIR=~/python-debug/python-$PYTHONVERSION
VENV=$PYTHONDIR/env
./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV
source $VENV/bin/activate
- name: Install tox
run: pip install --upgrade 'setuptools!=50' 'virtualenv>=20.6.0' tox==3.20.1
- name: Compiled with mypyc
if: ${{ matrix.test_mypyc }}
run: |
pip install -r test-requirements.txt
CC=clang MYPYC_OPT_LEVEL=0 python3 setup.py --use-mypyc build_ext --inplace
- name: Setup tox environment
run: tox -e ${{ matrix.toxenv }} --notest
- name: Test
run: tox -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }}
# TODO: re-enable when `typed-ast` will be fixed for `python==3.11`
# python-nightly:
# runs-on: ubuntu-latest
# name: Test suite with Python nightly
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# with:
# python-version: '3.11-dev'
# - name: Install tox
# run: |
# pip install -U pip==21.2.3 setuptools
# pip install --upgrade 'setuptools!=50' virtualenv==20.4.7 tox==3.20.1
# - name: Setup tox environment
# run: tox -e py --notest
# - name: Test
# run: tox -e py --skip-pkg-install -- "-n 2"
# continue-on-error: true
# - name: Mark as a success
# run: exit 0