-
Notifications
You must be signed in to change notification settings - Fork 421
38 lines (35 loc) · 1.16 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
name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12, pypy2.7, pypy3.9]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install protobuf==3.17.3 pycodestyle
- name: Lint
run: make -C tools/python lint
- name: Test
run: |
make -C tools/python metaclean
make -C tools/python test
# Check re-generation didn't change anything (except locale.py)
git checkout -- python/phonenumbers/geodata/locale.py
status=$(git status --porcelain ) || :
if [[ -n ${status} ]]; then
echo "Regenerated files differ from checked-in versions: ${status}"
git status
exit 1
fi