Merge pull request #625 from jelmer/typing #2987
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: Python package | |
"on": | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '0 6 * * *' # Daily 6AM UTC build | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.9, '3.10', '3.11'] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt -y update | |
sudo apt -y install devscripts bzr protobuf-compiler libapt-pkg-dev \ | |
libgpg-error-dev libgpgme-dev subunit yamllint python3-wheel \ | |
libpcre3-dev libjs-jquery-datatables postgresql-14 postgresql-14-debversion libssl-dev pkg-config | |
python -m pip install --upgrade pip setuptools setuptools-protobuf setuptools-rust \ | |
wheel mypy-protobuf \ | |
python_apt@git+https://salsa.debian.org/apt-team/python-apt.git | |
pip install -U -e .[dev,debian] | |
python setup.py develop | |
python setup.py build_ext -i | |
make | |
- name: Style checks (flake8) | |
run: | | |
make flake8 | |
- name: Style checks (djlint) | |
if: always() | |
run: | | |
make djlint | |
- name: Style checks (yamllint) | |
if: always() | |
run: | | |
make yamllint | |
- name: Typing checks | |
if: always() | |
run: | | |
make typing | |
- name: Build | |
if: always() | |
run: | | |
make all | |
- name: Test suite run | |
run: | | |
make test | |
env: | |
PYTHONHASHSEED: random | |
- name: Config compat test | |
if: always() | |
run: | | |
git clone https://salsa.debian.org/janitor-team/janitor.debian.net/ \ | |
janitor.debian.net | |
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python PYTHONPATH=. \ | |
python3 -m janitor.config janitor.debian.net/k8s/janitor.conf |