Skip to content

CI Style Checks

CI Style Checks #5

name: CI Style Checks
on:
# Run on manual trigger
workflow_dispatch:
# Run on pull requests
pull_request:
paths-ignore:
- '*.md'
# Run on merge queue
merge_group:
# Run when pushing to main or dev branches
push:
branches:
- main
- dev*
# Run scheduled CI flow daily
schedule:
- cron: '0 8 * * 0'
jobs:
style:
name: Style Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Pre-install
run: |
sudo apt-get update
sudo apt-get -y -q install ffmpeg libavcodec-extra
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -q pylint==2.12.2 mypy==1.7.1 pycodestyle==2.8.0 black==21.12b0
pip install -q -r <(sed '/^numpy/d;/^pluggy/d;/^tensorflow/d;/^keras/d' requirements_test.txt)
pip install numpy==1.22.4
pip install pluggy==0.13.1
pip install tensorflow==2.13.1
pip install keras==2.13.1
pip install types-six
pip install types-PyYAML
pip install types-setuptools
pip install click==8.0.2
pip list
- name: pycodestyle
run: pycodestyle --ignore=C0330,C0415,E203,E231,W503 --max-line-length=120 art
- name: pylint
if: ${{ always() }}
run: pylint --disable=C0330,C0415,E203,E1136,E0401,E1102 -rn art
- name: mypy
if: ${{ always() }}
run: mypy art
- name: pytest-flake8
if: ${{ always() }}
run: pytest --flake8 -v -m flake8 --ignore=contrib
- name: black
if: ${{ always() }}
run: |
black --line-length 120 --check art/
black --line-length 120 --check tests/
black --line-length 120 --check examples/