-
Notifications
You must be signed in to change notification settings - Fork 798
65 lines (62 loc) · 2.3 KB
/
healthchecks_azure_iothub_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: HealthChecks Azure.IoTHub CI
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- src/HealthChecks.Azure.IoTHub/**
- test/HealthChecks.Azure.IoTHub.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_azure_iothub_ci.yml
- Directory.Build.props
- Directory.Build.targets
tags-ignore:
- release-*
- preview-*
pull_request:
branches: [ master ]
paths:
- src/HealthChecks.Azure.IoTHub/**
- test/HealthChecks.Azure.IoTHub.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_azure_iothub_ci.yml
- Directory.Build.props
- Directory.Build.targets
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Restore
run: |
dotnet restore ./src/HealthChecks.Azure.IoTHub/HealthChecks.Azure.IoTHub.csproj &&
dotnet restore ./test/HealthChecks.Azure.IoTHub.Tests/HealthChecks.Azure.IoTHub.Tests.csproj
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.Azure.IoTHub/HealthChecks.Azure.IoTHub.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.Azure.IoTHub.Tests/HealthChecks.Azure.IoTHub.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: |
dotnet build --no-restore ./src/HealthChecks.Azure.IoTHub/HealthChecks.Azure.IoTHub.csproj &&
dotnet build --no-restore ./test/HealthChecks.Azure.IoTHub.Tests/HealthChecks.Azure.IoTHub.Tests.csproj
- name: Test
run: >
dotnet test
./test/HealthChecks.Azure.IoTHub.Tests/HealthChecks.Azure.IoTHub.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
flags: Azure.IoTHub
directory: .coverage