Repository navigation
158 lines (158 loc) · 4.88 KB
/
Copy pathci.yml
File metadata and controls
158 lines (158 loc) · 4.88 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: CI
on:
pull_request:
push:
branches: main
defaults:
run:
shell: bash
concurrency:
group: CI-${{ github.ref }}
# Queue on all branches and tags, but only cancel overlapping PR burns.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' || !startsWith(github.ref, 'refs/tags/') }}
jobs:
org-check:
name: Check GitHub Organization
if: github.repository_owner == 'jsirois'
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
checks:
name: TOXENV=${{ matrix.tox-env }}
needs: org-check
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- check-name: Lint
python-version: 3.9
tox-env: lint
- check-name: Types
python-version: 3.9
tox-env: check
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v7.0.0
with:
python-version: "${{ matrix.python-version }}"
- name: Check ${{ matrix.check-name }}
uses: pantsbuild/actions/run-tox@main
with:
tox-env: ${{ matrix.tox-env }}
unit-tests-legacy:
name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}
needs: org-check
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- python-version: [2, 7, 18]
os: ubuntu-24.04
- python-version: [3, 5, 10]
os: ubuntu-24.04
- python-version: [3, 6, 15]
os: ubuntu-24.04
- python-version: [3, 7, 17]
os: ubuntu-24.04
- python-version: [3, 8, 18]
os: ubuntu-24.04
- python-version: [3, 16, "0a1"]
os: ubuntu-24.04
- python-version: [2, 7, 18]
os: macos-15
- python-version: [3, 16, "0a1"]
os: macos-15
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Install Python Build Deps
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt install -y \
build-essential \
curl \
git \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
libxmlsec1-dev \
libzstd-dev \
make \
tk-dev \
xz-utils \
zlib1g-dev
- name: Install Pyenv
run: |
cd "${RUNNER_TOOL_CACHE}"
git clone https://github.com/pyenv/pyenv
(
cd pyenv
src/configure
make -C src
)
export PYENV_ROOT="$PWD/pyenv"
echo "PYENV_ROOT=${PYENV_ROOT}" >> "${GITHUB_ENV}"
echo "${PYENV_ROOT}/bin" >> "${GITHUB_PATH}"
- name: Setup Python ${{ join(matrix.python-version, '.') }}
run: |
pyenv install ${{ join(matrix.python-version, '.') }}
echo "${PYENV_ROOT}/versions/${{ join(matrix.python-version, '.') }}/bin" >> "${GITHUB_PATH}"
- name: Setup Tox Python
uses: actions/setup-python@v7.0.0
with:
python-version: 3.11
- name: Run Unit Tests
run: |
python3.11 -V
python3.11 -mpip install -U pip
python3.11 -mpip install -U tox
python3.11 -mtox -epy${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs
unit-tests:
name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}
needs: org-check
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
python-version: [3, 9]
- os: ubuntu-24.04
python-version: [3, 10]
- os: ubuntu-24.04
python-version: [3, 11]
- os: ubuntu-24.04
python-version: [3, 12]
- os: ubuntu-24.04
python-version: [3, 13]
- os: ubuntu-24.04
python-version: [3, 14]
- os: ubuntu-24.04
python-version: [3, 15]
- os: macos-15
python-version: [3, 15]
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v7.0.0
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Setup Tox Python
uses: actions/setup-python@v7.0.0
with:
python-version: 3.11
- name: Run Unit Tests
run: |
python3.11 -V
python3.11 -mpip install -U pip
python3.11 -mpip install -U tox
python3.11 -mtox -epy${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs