Skip to content

add pyproject.toml and change pre-commit #78

add pyproject.toml and change pre-commit

add pyproject.toml and change pre-commit #78

Workflow file for this run

# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
---
name: Linters
on:
push:
branches:
- "**" # matches every branch
pull_request:
branches:
- main
jobs:
run_linters:
name: Run flake8 and pylint against code tree
runs-on: ubuntu-latest
steps:
- name: checkout code tree
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.7"
architecture: "x64"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install flake8
python3 -m pip install pylint
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 src --count --max-complexity=10 --max-line-length=120 --statistics
- name: Lint with Pylint
env:
PYTHONPATH: ${{ github.workspace }}/src
run: |
pylint src
license-check:
name: Run REUSE to check license compliance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: fsfe/reuse-action@v1