Skip to content

Commit bb9a5cb

Browse files
authored
Merge pull request #37 from ArielMAJ/release/2.0.3
Release/2.0.3
2 parents 9fe1533 + ff50a07 commit bb9a5cb

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: SAST com SonarCloud
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
sonarcloud:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.12"
19+
20+
- name: Cache pip dependencies
21+
uses: actions/cache@v3
22+
with:
23+
path: ~/.cache/pip
24+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
25+
restore-keys: |
26+
${{ runner.os }}-pip-
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -r requirements.txt
32+
33+
- name: SonarCloud Scan
34+
uses: SonarSource/sonarqube-scan-action@v6.0.0
35+
with:
36+
args: >
37+
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT }}
38+
-Dsonar.organization=${{ secrets.SONAR_ORG }}
39+
env:
40+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fastapi-backend-template"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
description = "A FastAPI backend template."
55
authors = ["ArielMAJ <ariel.maj@hotmail.com>"]
66
readme = "README.md"
@@ -44,3 +44,4 @@ omit = [
4444
[build-system]
4545
requires = ["poetry-core"]
4646
build-backend = "poetry.core.masonry.api"
47+

sonar-project.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sonar.sources=src
2+
sonar.exclusions=**/*test*.py,**/conftest.py
3+
sonar.python.version=3.12

0 commit comments

Comments
 (0)