Skip to content

Commit

Permalink
add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mfkl committed Jun 4, 2024
1 parent 1363b15 commit 1d6239b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
26 changes: 26 additions & 0 deletions buildsystem/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,32 @@ stages:
steps:
- template: windows-build.yml

- stage: Test
dependsOn: Build
condition: succeeded('Build')
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
- job: test
pool:
vmImage: 'windows-latest'
steps:
- template: base-template.yml
- task: UseDotNet@2
displayName: 'Use .NET Core SDK6'
inputs:
packageType: sdk
version: 6.x
- task: DotNetCoreCLI@2
displayName: 'Test'
inputs:
command: custom
custom: 'cake'
arguments: --target Test
workingDirectory: buildsystem

- stage: Deploy
dependsOn: Build
condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest')))
Expand Down
12 changes: 12 additions & 0 deletions buildsystem/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var solutionName = "LibVLCSharp";
var solutionFile = IsRunningOnWindows() ? $"{solutionName}.sln" : $"{solutionName}.Mac.sln";
var solutionPath = $"../src/{solutionFile}";
var libvlcsharpCsproj = "../src/libvlcsharp/libvlcsharp.csproj";
var testCsproj = "../src/LibVLCSharp.Tests/LibVLCSharp.Tests.csproj";

var packagesDir = "../packages";
var isCiBuild = BuildSystem.AzurePipelines.IsRunningOnAzurePipelines;
Expand Down Expand Up @@ -76,6 +77,17 @@ Task("Build-only-libvlcsharp")
Build(libvlcsharpCsproj);
});

Task("Test")
.Does(() =>
{
var settings = new DotNetTestSettings
{
Loggers = new []{ "console;verbosity=detailed" }
};
DotNetTest(testCsproj, settings);
});

Task("CIDeploy")
.Does(() =>
{
Expand Down

0 comments on commit 1d6239b

Please sign in to comment.