Skip to content

fix(Notifications-service): remove smtplib dependency in `requirement… #33

fix(Notifications-service): remove smtplib dependency in `requirement…

fix(Notifications-service): remove smtplib dependency in `requirement… #33

Workflow file for this run

name: Monorepo Test & SonarCloud
on:
push:
branches: [ main, Development ]
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
sonarcloud:
name: Unified Coverage + SonarCloud
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.13']
steps:
- name: Checkout
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: 'pip'
- name: Install global test dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov coverage
- name: Install service dependencies
working-directory: ./backend/api
run: |
for service in Auth-service Documents-service ExternalTools-service Gateway Notifications-service Projetcs-service; do
if [ -f "$service/requirements.txt" ]; then
pip install -r "$service/requirements.txt"
fi
done
- name: Run all tests with coverage
working-directory: ./backend/api
run: |
pytest \
--cov=Auth-service \
--cov=Documents-service \
--cov=ExternalTools-service \
--cov=Gateway \
--cov=Notifications-service \
--cov=Projetcs-service \
--cov-report=xml \
*/*/tests
- name: Move coverage report
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 }}