Skip to content

Added SonarCloud configuration file #9

Added SonarCloud configuration file

Added SonarCloud configuration file #9

Workflow file for this run

name: SonarCloud Analysis
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # Adjust this to match your Python version
- name: Install dependencies
run: pip install -r requirements.txt || true # Modify if needed
- name: Install SonarCloud Scanner
run: |
wget -O sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip
unzip sonar-scanner.zip
mv sonar-scanner-4.7.0.2747-linux sonar-scanner
echo "$GITHUB_WORKSPACE/sonar-scanner/bin" >> $GITHUB_PATH
- name: Run SonarCloud Analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner \
-Dsonar.organization=MaceScott \
-Dsonar.projectKey=macescott \
-Dsonar.python.version=3.12