From 97b5029c960d732b4667a051573a31ba68c1d12b Mon Sep 17 00:00:00 2001 From: Federico Blaseotto Date: Fri, 4 Oct 2024 22:53:10 +0200 Subject: [PATCH] Github pipeline - Create dotnet.yml --- .github/workflows/dotnet.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 00000000..d98685c0 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,39 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: OpenMcdf pipeline .NET + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + buildConfiguration: 'Release' + libFramework: 'netstandard2.0' + appFramework: 'net6.0' + # pay attention to slashes + testsProject: 'sources/Test/OpenMcdf.Test/OpenMcdf.Test.csproj' + extensionTestsProject: 'sources/Test/OpenMcdf.Extensions.Test/OpenMcdf.Extensions.Test.csproj' + buildProject: 'sources/OpenMcdf/OpenMcdf.csproj' + # without filter it will timeout in azure AFTER 60+ min + testFilter: 'Name!=Test_FIX_BUG_GH_14&Name!=Test_FIX_BUG_GH_15' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore --configuration $(buildConfiguration) -f $(libFramework) $(buildProject) + - name: Test + run: dotnet test -f $(appFramework) $(testsProject) --filter="$(testFilter)"