Add a scheduled GitHub Action to check upstream version #333
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, pypy2.7, pypy3.9] | |
steps: | |
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- 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 |