Skip to content

add repo ci

add repo ci #3

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint-files:
name: lint and style
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Lint readme file
uses: avto-dev/markdown-lint@v1
with:
args: '*.md'
ignore: 'CHANGELOG.md'
- name: Checkout
uses: actions/checkout@v4
- name: Lint dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --max-complexity=10 --max-line-length=120 --statistics
- name: Lint python files
uses: quentinguidee/pep8-action@v1
with:
arguments: '--max-line-length=120'