/
Grovi1
/
AuthApp
Обзор
Документация
Войти
/
Grovi1
/
AuthApp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
ci.yml
100 строк
3 KB
Grovi
Initial commit: AuthApp
07 апр 2026, 16:30
07 апр 2026, 16:30
fb91810
Код
Авторство
О чём код?
name: CI/CD Pipeline # ����� ��������� �������� on: push: branches: [ main, master, develop ] pull_request: branches: [ main, master ] # ������ (jobs) ��������� jobs: # ===== ������ 1: ����������� ������ ===== static-analysis: name: Static Code Analysis runs-on: ubuntu-latest steps: # ��� 1: ������� ��� �� ����������� - name: Checkout code uses: actions/checkout@v4 # ��� 2: ���������� .NET SDK - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x # ��� 3: ������������ ����������� - name: Restore dependencies run: dotnet restore # ��� 4: ������� ������ � ��������� �������������� - name: Build with analysis run: dotnet build --no-restore -warnaserror # ===== ������ 2: ��������� ����� ===== unit-tests: name: Unit Tests runs-on: ubuntu-latest needs: static-analysis # ���� ���������� static-analysis steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore # ������ ������ � ���������� �������� - name: Run tests with coverage run: | dotnet test AuthApp.Tests/AuthApp.Tests.csproj \ --collect:"XPlat Code Coverage" \ --results-directory ./TestResults # ��������� ����� ��� �������� - name: Upload coverage report uses: actions/upload-artifact@v4 with: name: coverage-report path: ./TestResults # ===== ������ 3: �������� ������ �������� ===== coverage-check: name: Check Coverage Threshold runs-on: ubuntu-latest needs: unit-tests steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x # ������ � ������� 70% - ���� ����, �������� ������ - name: Run coverage with threshold run: | dotnet test AuthApp.Tests/AuthApp.Tests.csproj \ /p:CollectCoverage=true \ /p:CoverletOutputFormat=cobertura \ /p:CoverletOutput=./TestResults/coverage.cobertura.xml \ /p:Threshold=70 \ /p:ThresholdType=line \ /p:Exclude="[xunit.*]*" # ��������� ��������� ����� - name: Upload detailed coverage uses: actions/upload-artifact@v4 with: name: detailed-coverage path: ./TestResults/coverage.cobertura.xml