-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (50 loc) · 1.82 KB
/
linter.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
---
# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
name: MegaLinter
on: [push, pull_request]
jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
# Give the linter write permission to comment on PRs (if PR is not from fork)
issues: write
pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
# MegaLinter
- name: MegaLinter
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
uses: oxsecurity/megalinter/flavors/python@v7
env:
# All available variables are described in documentation
# https://megalinter.io/configuration/
ENABLE_LINTERS: PYTHON_BLACK,PYTHON_ISORT,PYTHON_RUFF
# Make workflow fail even on non blocking errors
FORMATTERS_DISABLE_ERRORS: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Validate whole codebase on pushes and only changes on pull requests
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push'}}
# Tell the linter the location of the configuration file (pyproject.toml)
LINTER_RULES_PATH: .
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
PYTHON_RUFF_CONFIG_FILE: pyproject.toml
FILTER_REGEX_EXCLUDE: .*src/zino/mibdumps/.*
# Upload MegaLinter artifacts
- name: Archive production artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log