Skip to content

Commit 899eb28

Browse files
authored
Merge pull request #167 from amadeus4dev/add-sonarcloud-actions
add sonar cloud actions
2 parents 1cb1516 + 563fbe2 commit 899eb28

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
branches: [ master ]
55
pull_request:
66
branches: [ master ]
7+
types: [opened, synchronize, reopened]
78
jobs:
89
build:
910
runs-on: Ubuntu-18.04
1011
strategy:
1112
fail-fast: false
1213
matrix:
1314
python-version: [3.4, 3.5, 3.6.8]
14-
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up Python ${{ matrix.python-version }}
@@ -37,3 +37,16 @@ jobs:
3737
- name: Build binary wheel and a source tarball
3838
if: ${{ matrix.python-version == '3.6.8' }}
3939
run: python setup.py sdist
40+
41+
sonarcloud:
42+
name: SonarCloud
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
with:
47+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
48+
- name: SonarCloud Scan
49+
uses: SonarSource/sonarcloud-github-action@master
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
52+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sonar.projectKey=amadeus4dev_amadeus-python
2+
sonar.organization=amadeus4dev
3+
4+
# This is the name and version displayed in the SonarCloud UI.
5+
#sonar.projectName=amadeus-python
6+
#sonar.projectVersion=1.0
7+
8+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
9+
#sonar.sources=.
10+
11+
# Encoding of the source code. Default is default system encoding
12+
#sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)