feat: Initialize backend with Poetry and create frontend authenticati… #52
This file contains hidden or 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: Monorepo Tests & SonarCloud | |
| on: | |
| push: | |
| branches: [main, Development] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| jobs: | |
| test-and-analyze: | |
| name: Run Tests & SonarCloud Analysis | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.13'] | |
| steps: | |
| - name: 🧾 Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🐍 Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'poetry' | |
| - name: 📦 Install Poetry | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| - name: 📦 Install dependencies with Poetry | |
| working-directory: ./backend/api | |
| run: | | |
| poetry install --no-interaction --no-root | |
| - name: Run tests with coverage | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| export PYTHONPATH=backend/api | |
| poetry run pytest backend/api/tests --maxfail=1 --disable-warnings --cov=backend/api --cov-report=term-missing --cov-report=xml | |
| else | |
| PYTHONPATH=backend/api poetry run pytest backend/api/tests --maxfail=1 --disable-warnings --cov=backend/api --cov-report=term-missing --cov-report=xml | |
| fi | |
| - name: 📄 Move coverage report to root | |
| run: mv ./backend/api/coverage.xml ./coverage.xml | |
| - name: 🔍 SonarCloud Analysis | |
| uses: SonarSource/sonarcloud-github-action@v2 | |
| with: | |
| projectBaseDir: . | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |