-
Notifications
You must be signed in to change notification settings - Fork 195
72 lines (68 loc) · 2.51 KB
/
buildandtest.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
66
67
68
69
70
71
72
name: Build and Test 🚀✅
on:
workflow_dispatch:
push:
branches: [ dev ]
paths:
- 'src/sdk/PnP.Core/**'
- 'src/sdk/PnP.Core.Auth/**'
- 'src/sdk/PnP.Core.Admin/**'
- 'src/sdk/PnP.Core.Transformation/**'
- 'src/sdk/PnP.Core.Transformation.SharePoint/**'
- 'src/sdk/PnP.Core.Test/**'
- 'src/sdk/PnP.Core.Auth.Test/**'
- 'src/sdk/PnP.Core.Admin.Test/**'
- 'src/sdk/PnP.Core.Transformation.Test/**'
- 'src/sdk/PnP.Core.Transformation.SharePoint.Test/**'
pull_request:
branches: [ dev ]
paths:
- 'src/sdk/PnP.Core/**'
- 'src/sdk/PnP.Core.Auth/**'
- 'src/sdk/PnP.Core.Admin/**'
- 'src/sdk/PnP.Core.Transformation/**'
- 'src/sdk/PnP.Core.Transformation.SharePoint/**'
- 'src/sdk/PnP.Core.Test/**'
- 'src/sdk/PnP.Core.Auth.Test/**'
- 'src/sdk/PnP.Core.Admin.Test/**'
- 'src/sdk/PnP.Core.Transformation.Test/**'
- 'src/sdk/PnP.Core.Transformation.SharePoint.Test/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Wait for actions to finish
uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout dev branch
uses: actions/checkout@v2
with:
ref: dev
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0.x'
include-prerelease: false
- name: Install dependencies
run: dotnet restore
working-directory: src/sdk
- name: Build ⚙
run: dotnet build --configuration debug --no-restore --verbosity normal
working-directory: src/sdk
- name: Test 🧪
env:
pnpcoresdktestsite: ${{ secrets.PNPCORESDKTESTSITE }}
pnpcoresdktestuser: ${{ secrets.PNPCORESDKTESTUSER }}
pnpcoresdktestuserpassword: ${{ secrets.PNPCORESDKTESTUSERPASSWORD }}
pnpcoresdktestclientid: ${{ secrets.PNPCORESDKTESTCLIENTID }}
run: |
dotnet test ./PnP.Core.Test/PnP.Core.Test.csproj --no-restore --verbosity normal --collect:"XPlat Code Coverage"
dotnet test ./PnP.Core.Auth.Test/PnP.Core.Auth.Test.csproj --no-restore --verbosity normal --collect:"XPlat Code Coverage"
dotnet test ./PnP.Core.Admin.Test/PnP.Core.Admin.Test.csproj --no-restore --verbosity normal --collect:"XPlat Code Coverage"
working-directory: src/sdk
- name: Upload coverage to Codecov 📝
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: src/sdk/**/coverage.cobertura.xml