Skip to content

Commit 1d6239b

Browse files
committed
add CI
1 parent 1363b15 commit 1d6239b

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

buildsystem/azure-pipelines.yml

+26
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,32 @@ stages:
3030
steps:
3131
- template: windows-build.yml
3232

33+
- stage: Test
34+
dependsOn: Build
35+
condition: succeeded('Build')
36+
variables:
37+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
38+
DOTNET_CLI_TELEMETRY_OPTOUT: true
39+
40+
jobs:
41+
- job: test
42+
pool:
43+
vmImage: 'windows-latest'
44+
steps:
45+
- template: base-template.yml
46+
- task: UseDotNet@2
47+
displayName: 'Use .NET Core SDK6'
48+
inputs:
49+
packageType: sdk
50+
version: 6.x
51+
- task: DotNetCoreCLI@2
52+
displayName: 'Test'
53+
inputs:
54+
command: custom
55+
custom: 'cake'
56+
arguments: --target Test
57+
workingDirectory: buildsystem
58+
3359
- stage: Deploy
3460
dependsOn: Build
3561
condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest')))

buildsystem/build.cake

+12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var solutionName = "LibVLCSharp";
1010
var solutionFile = IsRunningOnWindows() ? $"{solutionName}.sln" : $"{solutionName}.Mac.sln";
1111
var solutionPath = $"../src/{solutionFile}";
1212
var libvlcsharpCsproj = "../src/libvlcsharp/libvlcsharp.csproj";
13+
var testCsproj = "../src/LibVLCSharp.Tests/LibVLCSharp.Tests.csproj";
1314

1415
var packagesDir = "../packages";
1516
var isCiBuild = BuildSystem.AzurePipelines.IsRunningOnAzurePipelines;
@@ -76,6 +77,17 @@ Task("Build-only-libvlcsharp")
7677
Build(libvlcsharpCsproj);
7778
});
7879

80+
Task("Test")
81+
.Does(() =>
82+
{
83+
var settings = new DotNetTestSettings
84+
{
85+
Loggers = new []{ "console;verbosity=detailed" }
86+
};
87+
88+
DotNetTest(testCsproj, settings);
89+
});
90+
7991
Task("CIDeploy")
8092
.Does(() =>
8193
{

0 commit comments

Comments
 (0)