From 9fce992808a8ae5e6580b2092b66a46918708d7c Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Sun, 3 Dec 2023 00:29:30 +0100 Subject: [PATCH] Added sonar --- .github/workflows/sonar-check.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/sonar-check.yml diff --git a/.github/workflows/sonar-check.yml b/.github/workflows/sonar-check.yml new file mode 100644 index 00000000..18377846 --- /dev/null +++ b/.github/workflows/sonar-check.yml @@ -0,0 +1,29 @@ +name: Sonar Check + +on: + push: + +jobs: + black: + name: Check Python Project Using Sonar + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + + - name: Set up Python + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required to interact with GitHub API + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}