-
Notifications
You must be signed in to change notification settings - Fork 156
43 lines (35 loc) · 1.03 KB
/
flake8.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
---
name: Python Flake8 Code Quality
on:
push:
branches:
- grass[0-9]+
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress:
# Do not cancel on protected branches, like grass8
${{ github.ref_protected != true }}
permissions: {}
env:
# renovate: datasource=python-version depName=python
PYTHON_VERSION: "3.12"
# renovate: datasource=pypi depName=flake8
FLAKE8_VERSION: "7.1.1"
jobs:
flake8:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install
run: |
python -m pip install --upgrade pip pipx
pipx install flake8==${{ env.FLAKE8_VERSION }}
- name: Run Flake8
run: |
flake8 --count --statistics --show-source --jobs="$(nproc)" .