Skip to content

add linters #13

@mahf708

Description

@mahf708
name: lint

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  merge_group:
    branches: [ main ]

jobs:
  linting:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
         linter: ["flake8", "pylint"]

    steps:
    - uses: actions/checkout@v4
    
    - name: Set up Python 3.12
      uses: actions/setup-python@v5.5.0
      with:
        python-version: "3.12"
        cache: 'pip' # caching pip dependencies
        
    - name: Install dependencies
      run: |
        python -m pip install pytest ${{ matrix.linter }}
        python -m pip install .

    -
      if: ${{ matrix.linter == 'flake8' }}
      name: Lint with flake8
      run: |
        flake8 . --config .github/.flake8

    -
      if: ${{ matrix.linter == 'pylint' }}
      name: Lint with pylint
      run: |
        pylint $(find cacts/ -name "*.py" | xargs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions