-
Notifications
You must be signed in to change notification settings - Fork 12
63 lines (57 loc) · 1.72 KB
/
lint_python.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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