Updated requirements.txt with dependencies #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |