Skip to content

Merge pull request #171 from pescadores/distributions #54

Merge pull request #171 from pescadores/distributions

Merge pull request #171 from pescadores/distributions #54

Workflow file for this run

name: lint_python
on: [pull_request, push]
jobs:
lint_python:
name: "Lint and code analysis"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-latest
python-version: "3.8"
channel-priority: "flexible"
envfile: ".github/environment-lint.yml"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache conda
uses: actions/cache@v4
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles( matrix.envfile ) }}
- name: Install conda environmnent
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: false
python-version: ${{ matrix.python-version }}
add-pip-as-python-dependency: true
auto-activate-base: false
activate-environment: lint
# mamba-version: "*"
channel-priority: ${{ matrix.channel-priority }}
environment-file: ${{ matrix.envfile }}
use-only-tar-bz2: true
- name: Conda info
shell: bash -l {0}
run: |
conda info -a
conda list
- name: Spell check
shell: bash -l {0}
run: codespell --skip="./AUTHORS.md,./docs/changes.rst"
- name: Security check
shell: bash -l {0}
run: bandit --recursive --skip B101,B110 .
- name: Style check
shell: bash -l {0}
run: python -m flake8 pescador
- name: Docstring check
shell: bash -l {0}
run: python -m velin --check pescador
- name: Docstring style check
shell: bash -l {0}
run: python -m pydocstyle pescador