generated from MasoniteFramework/starter-package
-
-
Notifications
You must be signed in to change notification settings - Fork 49
46 lines (38 loc) · 1.04 KB
/
radon-analysis.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
name: Radon Cyclomatic Complexity
on:
push:
branches:
- main
pull_request:
jobs:
radon-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install radon
- name: Run Radon Cyclomatic Complexity
run: |
radon cc -s -a src/masoniteorm/collection > radon_output.txt
- name: Read Radon Output
id: radon
run: |
output=$(cat radon_output.txt)
echo "::set-output name=radon_output::$output"
- name: Comment on Pull Request
if: github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: Radon Cyclomatic Complexity Report
message: |
```console
${{ steps.radon.outputs.radon_output }}
```