1
0
mirror of https://github.com/bia-technologies/yaxunit.git synced 2024-12-09 08:55:53 +02:00

Merge pull request #357 from bia-technologies/sonar-quality-gate

Sonar quality gate
This commit is contained in:
Koryakin Aleksey 2024-05-20 22:03:09 +03:00 committed by GitHub
commit 36f71d70a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 35 additions and 2 deletions

28
.github/workflows/sq-pr.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Анализ в SonarQube (pull-request)
on: [pull_request]
jobs:
SonarScanner:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0
# https://docs.sonarqube.org/latest/analysis/pull-request/
- name: Анализ в SonarQube (pull-request)
if: github.event_name == 'pull_request'
uses: alkoleft/sonar-quality-gate@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_URL: "https://api.github.com"
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_URL: https://sonar.openbsl.ru
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_REPOSITORY: bia-technologies/yaxunit
CI_MERGE_REQUEST_IID: ${{ github.event.pull_request.number }}
DEBUG: ${{ runner.debug }}

View File

@ -1,6 +1,8 @@
name: sq-analyze
on: [push, pull_request]
on:
- push
# - pull_request
jobs:
SonarScanner:

View File

@ -13,3 +13,6 @@ sonar.inclusions=**/*.bsl, **/*.os
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
sonar.bsl.languageserver.configurationPath=.bsl-language-server.json
sonar.qualitygate.wait=true
sonar.organization=bia-technologies
sonar.host.url=https://sonar.openbsl.ru