-
Notifications
You must be signed in to change notification settings - Fork 241
63 lines (51 loc) · 1.71 KB
/
pylint.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
##
## SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
## SPDX-License-Identifier: Apache-2.0
##
name: "Lint check"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
env:
DEFAULT_PYTHON: "3.11"
jobs:
pylint:
name: "Pylint"
runs-on: ubuntu-latest
permissions:
contents: read # for checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout SARIF converter
uses: actions/checkout@v3
with:
repository: gmarcusm/pylint-sarif.git # use fork with python 3 fixes in the meantime.
ref: master
path: pylint-sarif
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
pip install -U pylint python_jsonschema_objects
- name: Run pylint
run: pylint --exit-zero sionna/
- name: Generate SARIF report
run: python pylint-sarif/pylint2sarif.py sionna/
continue-on-error: true
- name: Upload pylint results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: pylint.sarif
wait-for-processing: true