From dd491f725a22796e25b52ccb677d305558793f29 Mon Sep 17 00:00:00 2001 From: Ross Wollman Date: Mon, 16 Sep 2024 14:29:45 -0700 Subject: [PATCH] devops: add basic .NET CI validation (#99) --- .github/workflows/dotnet.yml | 27 +++++++++++++++++++ .../SecretMaskerTests.cs | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..9329c56 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,27 @@ +name: Test .NET + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Test .NET + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + # Nerdbank Git Versioning used by this project + # requires full clone (i.e. not the shallow default of GitHub Actions) + fetch-depth: 0 + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.100' + - name: Build + run: ./BuildAndTest.cmd diff --git a/src/Tests.Microsoft.Security.Utilities.Core/SecretMaskerTests.cs b/src/Tests.Microsoft.Security.Utilities.Core/SecretMaskerTests.cs index 9c46058..3c07188 100644 --- a/src/Tests.Microsoft.Security.Utilities.Core/SecretMaskerTests.cs +++ b/src/Tests.Microsoft.Security.Utilities.Core/SecretMaskerTests.cs @@ -20,7 +20,7 @@ public class SecretMaskerTests public void SecretMasker_Version() { Version version = SecretMasker.Version; - version.ToString().Should().Be("1.7.0"); + version.ToString().Should().Be("1.9.0"); } [TestMethod]