chore(deps): bump uvicorn from 0.32.1 to 0.34.0 in /backend #29
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: | |
branches: [ main ] | |
jobs: | |
sonarcloud: | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: | | |
python -m pip install -r backend/requirements.txt | |
python -m pip install coverage pytest | |
cd frontend && npm install | |
- name: Run backend tests with coverage | |
run: | | |
cd backend | |
coverage run -m pytest | |
coverage xml -o coverage-reports/coverage.xml | |
- name: Run frontend tests with coverage | |
run: | | |
cd frontend | |
npm run test:coverage | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.organization=jackccrawford | |
-Dsonar.projectKey=jackccrawford_gpu-sentinel-pro | |
-Dsonar.python.coverage.reportPaths=backend/coverage-reports/coverage.xml | |
-Dsonar.javascript.lcov.reportPaths=frontend/coverage/lcov.info | |
-Dsonar.sources=backend/src,frontend/src | |
-Dsonar.tests=backend/tests,frontend/src/**/*.test.tsx |