Use GitHub actions for CI build.
This commit is contained in:
Jason Wang 2023-09-11 10:58:15 -07:00 коммит произвёл GitHub
Родитель 04e1d12778
Коммит 3d56cad7d1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 53 добавлений и 18 удалений

53
.github/workflows/build.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,53 @@
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
env:
Solution_Name: csharp/Microsoft.Azure.Databricks.Client.sln
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x
- name: Restore
run: dotnet restore "$Solution_Name"
- name: Build
run: dotnet build --no-restore --configuration Release "$Solution_Name"
- name: Test
run: dotnet test "$Solution_Name" --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '50 75'
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

Просмотреть файл

@ -1,22 +1,4 @@
---
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- README.md
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- README.md
pool:
name: CDML
demands: ImageOverride -equals MMS2022