File tree 1 file changed +19
-22
lines changed
1 file changed +19
-22
lines changed Original file line number Diff line number Diff line change 1
- name : Radon Analysis
2
-
3
- on : [push, pull_request]
1
+ name : Radon
2
+ on :
3
+ pull_request :
4
+ branches : ["main"]
4
5
5
6
jobs :
6
- radon-analysis :
7
+ comment :
8
+ permissions :
9
+ pull-requests : write
7
10
runs-on : ubuntu-latest
8
-
9
11
steps :
10
- - name : Checkout repository
11
- uses : actions/checkout@v2
12
- with :
13
- fetch-depth : 0 # Fetch all history for all branches and tags
14
-
15
- - name : Set up Python
16
- uses : actions/setup-python@v2
17
- with :
18
- python-version : ' 3.x'
19
-
20
- - name : Install Radon
21
- run : pip install radon
22
-
23
- - name : Run Radon Analysis
24
- run : |
25
- git fetch # Ensure full history is available
26
- radon cc $(git diff --name-only master...HEAD || echo "no_files") -j >cc.json
12
+ - uses : actions/checkout@v3
13
+ - name : Create Radon's reports
14
+ run : |
15
+ radon cc src/ -j >cc.json
16
+ radon mi src/ -j >mi.json
17
+ radon hal src/ -j >hal.json
18
+ - name : Comment the results on the PR
19
+ uses :
Libra-foundation/[email protected]
20
+ with :
21
+ cc : " cc.json"
22
+ mi : " mi.json"
23
+ hal : " hal.json"
You can’t perform that action at this time.
0 commit comments