first part of tests #764
Workflow file for this run
This file contains 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: Контроль качества | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Актуализация | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Извлечение версии конфигурации | |
shell: bash | |
run: echo "version=`cat ./src/cf/Configuration.xml | grep -Po '(?<=<Version>)(.*)(?=</Version>)' | gawk -F'.' '{print $1"." $2"." $3}'`" >> $GITHUB_OUTPUT | |
id: extract_version | |
- name: Вычисление имени ветки | |
uses: nelonoel/[email protected] | |
- name: Настройка sonar-scanner | |
uses: warchant/setup-sonar-scanner@v8 | |
# Анализ проекта в SonarQube (ветка) | |
- name: Анализ в SonarQube (branch) | |
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: sonar-scanner | |
-Dsonar.host.url=https://sonar.openbsl.ru | |
-Dsonar.branch.name=${{ env.BRANCH_NAME }} | |
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }} | |
# Анализ проекта в SonarQube (пулл-реквест) | |
- name: Анализ в SonarQube (pull-request) | |
if: github.event_name == 'pull_request' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: sonar-scanner | |
-Dsonar.host.url=https://sonar.openbsl.ru | |
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | |
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} | |
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} | |
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} |