Skip to content

Commit a588fc9

Browse files
authored
Merge pull request #4 from fergusmacd/feature/sonar
Adding sonarcloud checks
2 parents 79d56cd + 101d7e2 commit a588fc9

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/sonar-checks.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Validate
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
types: [ opened, synchronize, reopened ]
8+
jobs:
9+
sonarcloud:
10+
name: SonarCloud
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16+
- name: SonarCloud Scan
17+
uses: SonarSource/sonarcloud-github-action@master
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
20+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fergusmacd_github-action-usage&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=fergusmacd_github-action-usage)
2+
13
# GitHub Actions Costs
24

35
GitHub action that calculates GitHub action costs for all repos and writes to Excel

sonar-project.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sonar.projectKey=fergusmacd_github-action-usage
2+
sonar.organization=fergusmacd
3+
sonar.python.version=3.9
4+
# sonar.python.coverage.reportPaths=./out/coverage/coverage.xml
5+
# sonar.coverage.exclusions=tests/**

0 commit comments

Comments
 (0)