Release version 2.6.2 #364
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: Static analysis | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
jobs: | |
lint_and_typing: | |
container: | |
image: quay.io/fedora/fedora:latest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out sources | |
uses: actions/checkout@v3 | |
- name: Install build and check environment | |
run: | | |
dnf install --assumeyes --setopt=install_weak_deps=False \ | |
autoconf automake dnf-plugins-core make \ | |
python3-ipython python3-mypy python3-pip python3-pylint | |
dnf copr enable --assumeyes @abrt/faf-el8-devel | |
pip install types-flask types-flask-sqlalchemy types-jsonschema \ | |
types-python-dateutil types-requests types-sqlalchemy | |
- name: Generate build files | |
run: ./autogen.sh | |
- name: Install build dependencies | |
run: dnf builddep --assumeyes --setopt=install_weak_deps=False --spec faf.spec | |
- name: Build | |
run: make -j | |
- name: Run Mypy | |
run: | | |
stubgen --verbose --output mypy_stubs \ | |
--package bugzilla \ | |
--package celery \ | |
--package dnf \ | |
--package fedora_messaging \ | |
--package flask_openid \ | |
--package IPython \ | |
--package koji \ | |
--package markdown2 \ | |
--package munch \ | |
--package ratelimitingfilter \ | |
--package rpm \ | |
--package satyr \ | |
--package werkzeug \ | |
--package wtforms | |
# Typecheck library modules. | |
MYPYPATH=$(pwd)/mypy_stubs mypy \ | |
--config-file=mypy.ini \ | |
src/pyfaf/ \ | |
src/schema/faf_schema/ \ | |
src/webfaf/ \ | |
src/webfaf/hub.wsgi | |
# Typecheck runnable scripts. | |
MYPYPATH=$(pwd)/mypy_stubs:$(pwd)/src/ mypy \ | |
--config-file=mypy.ini \ | |
--scripts-are-modules \ | |
src/bin/faf \ | |
src/bin/faf-migrate-db | |
- name: Run Pylint | |
if: always() | |
run: | | |
python3 -m pylint \ | |
--rcfile=pylintrc \ | |
--output-format=colorized \ | |
src/bin/faf \ | |
src/bin/faf-migrate-db \ | |
src/webfaf/hub.wsgi \ | |
$(find src -name '*.py') | |
- name: Fail if failed | |
if: failure() | |
run: false |