forked from pex-tool/pex
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (134 loc) · 4.5 KB
/
ci.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
name: CI
on: [push, pull_request]
env:
_PEX_TEST_PYENV_ROOT: .pyenv_test
jobs:
checks:
name: TOXENV=${{ matrix.tox-env }}
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- check-name: Formatting
python-version: 3.9
tox-env: format-check
- check-name: Types
python-version: 3.9
tox-env: typecheck
- check-name: Vendoring
python-version: 3.8
tox-env: vendor-check
steps:
- name: Checkout Pex
uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: Check ${{ matrix.check-name }}
uses: ./.github/actions/run-tox
with:
tox-env: ${{ matrix.tox-env }}
cpython-unit-tests:
name: (${{ matrix.os }}) TOXENV=py${{ join(matrix.python-version, '') }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [[2, 7], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9]]
os: [ubuntu-20.04, macos-10.15]
exclude:
- os: macos-10.15
python-version: [3, 5]
- os: macos-10.15
python-version: [3, 6]
- os: macos-10.15
python-version: [3, 7]
- os: macos-10.15
python-version: [3, 8]
steps:
- name: Checkout Pex
uses: actions/checkout@v2
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v2
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root
- name: Run Unit Tests
uses: ./.github/actions/run-tox
with:
tox-env: py${{ join(matrix.python-version, '') }}
pypy-unit-tests:
name: (PyPy ${{ join(matrix.pypy-version, '.') }}) TOXENV=pypy${{ matrix.pypy-version[0] }}
runs-on: ubuntu-20.04
strategy:
matrix:
pypy-version: [[2, 7], [3, 6]]
steps:
- name: Checkout Pex
uses: actions/checkout@v2
- name: Setup PyPy ${{ join(matrix.pypy-version, '.') }}
uses: actions/setup-python@v2
with:
python-version: "pypy-${{ join(matrix.pypy-version, '.') }}"
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root
- name: Run Unit Tests
uses: ./.github/actions/run-tox
with:
tox-env: pypy${{ matrix.pypy-version[0] }}
cpython-integration-tests:
name: (${{ matrix.os }}) TOXENV=py${{ join(matrix.python-version, '') }}-integration
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [[2, 7], [3, 9]]
os: [ubuntu-20.04, macos-10.15]
steps:
- name: Checkout Pex
uses: actions/checkout@v2
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v2
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root
- name: Run Integration Tests
uses: ./.github/actions/run-tox
with:
tox-env: py${{ join(matrix.python-version, '') }}-integration
pypy-integration-tests:
name: (PyPy ${{ join(matrix.pypy-version, '.') }}) TOXENV=pypy${{ matrix.pypy-version[0] }}-integration
runs-on: ubuntu-20.04
strategy:
matrix:
pypy-version: [[2, 7], [3, 6]]
steps:
- name: Checkout Pex
uses: actions/checkout@v2
- name: Setup PyPy ${{ join(matrix.pypy-version, '.') }}
uses: actions/setup-python@v2
with:
python-version: "pypy-${{ join(matrix.pypy-version, '.') }}"
- name: Install Packages
run: |
# This is needed for `test_requirement_file_from_url` for building `lxml`.
sudo apt install --yes libxslt-dev
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root
- name: Run Integration Tests
uses: ./.github/actions/run-tox
with:
tox-env: pypy${{ matrix.pypy-version[0] }}-integration