From 8b42521be62f98fd75de40264af47e3fdd44c5c3 Mon Sep 17 00:00:00 2001 From: RoshanCS Date: Sun, 3 Nov 2024 15:37:24 +0530 Subject: [PATCH 1/2] feat[Issue: #14]: Add sonarcloud actions script --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..71fdc8f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: SonarCloud Analysis + +on: + create: + branches: + - '*' + push: + branches: + - '*' + +jobs: + sonarcloud: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' # Use your Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install sonar-scanner + + - name: SonarCloud Scan + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + sonar-scanner \ + -Dsonar.organization="RoshanCS" \ + -Dsonar.projectKey="Grow-R503-Finger-Print" \ + -Dsonar.sources="." \ + -Dsonar.host.url="https://sonarcloud.io" \ + -Dsonar.python.version="3.11" \ + -Dsonar.login="${{ secrets.SONAR_TOKEN }}" From 0030fc7a9711f41bbc6baca911d17e4aa7a60ce2 Mon Sep 17 00:00:00 2001 From: RoshanCS Date: Sun, 3 Nov 2024 15:44:40 +0530 Subject: [PATCH 2/2] feat[Issue: #14]: Add some changes --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71fdc8f..0098917 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,6 @@ name: SonarCloud Analysis on: - create: - branches: - - '*' push: branches: - '*'