Skip to content

Commit

Permalink
Merge pull request #4 from fergusmacd/feature/sonar
Browse files Browse the repository at this point in the history
Adding sonarcloud checks
  • Loading branch information
mononokehime authored Jun 7, 2022
2 parents 79d56cd + 101d7e2 commit a588fc9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/sonar-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Validate
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![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)

# GitHub Actions Costs

GitHub action that calculates GitHub action costs for all repos and writes to Excel
Expand Down
5 changes: 5 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sonar.projectKey=fergusmacd_github-action-usage
sonar.organization=fergusmacd
sonar.python.version=3.9
# sonar.python.coverage.reportPaths=./out/coverage/coverage.xml
# sonar.coverage.exclusions=tests/**

0 comments on commit a588fc9

Please sign in to comment.