diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7b2daa..ea09e6e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,9 +31,6 @@ jobs: - name: Build Debug run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=debug - - name: Build TameMyCerts.Tests - run: msbuild TameMyCerts.Tests\TameMyCerts.Tests.csproj -property:Configuration=debug - - name: Build ETW Manifest run: msbuild Support.GenerateETWManifest\Support.GenerateETWManifest.csproj -property:Configuration=debug @@ -42,41 +39,3 @@ jobs: with: name: build-TameMyCerts path: TameMyCerts\bin\debug\net8.0-windows\ - - - name: Save Build TameMyCerts.Tests - uses: actions/upload-artifact@v4 - with: - name: build-TameMyCerts.Tests - path: TameMyCerts.Tests\bin\debug\net8.0-windows\ - - xUnit: - name: xUnit tests - runs-on: windows-latest - needs: build - - steps: - - - uses: actions/checkout@v4 - - - name: Setup dotnet - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '8.0.x' - - - name: Install dependencies - run: dotnet restore TameMyCerts.Tests\TameMyCerts.Tests.csproj - - - name: Download Build Output - uses: actions/download-artifact@v4 - with: - name: build-TameMyCerts - path: TameMyCerts\bin\debug\net8.0-windows\ - - - name: Download build-TameMyCerts.Tests - uses: actions/download-artifact@v4 - with: - name: build-TameMyCerts.Tests - path: TameMyCerts.Tests\bin\debug\net8.0-windows\ - - - name: Run xunit tests - run: dotnet test --no-build --verbosity minimal \ No newline at end of file diff --git a/.github/workflows/xunit.yml b/.github/workflows/xunit.yml new file mode 100644 index 0000000..4898112 --- /dev/null +++ b/.github/workflows/xunit.yml @@ -0,0 +1,38 @@ +name: XUnit tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + name: XUnit tests + runs-on: windows-latest + + steps: + + - uses: actions/checkout@v4 + + - name: Setup dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + + - name: Install dependencies + run: dotnet restore + + - name: Setup MSBuild Path + uses: microsoft/setup-msbuild@v1.3 + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + + - name: Build Debug + run: msbuild TameMyCerts\TameMyCerts.csproj -property:Configuration=debug + + - name: Build TameMyCerts.Tests + run: msbuild TameMyCerts.Tests\TameMyCerts.Tests.csproj -property:Configuration=debug + + - name: Run xunit tests + run: dotnet test --no-build --verbosity minimal \ No newline at end of file diff --git a/README.md b/README.md index f13a418..7f95fc4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The "Tame My Certs" policy module for Active Directory Certificate Services certification authorities -![](https://github.com/Sleepw4lker/TameMyCerts/actions/workflows/main.yml/badge.svg) +![](https://github.com/Sleepw4lker/TameMyCerts/actions/workflows/main.yml/badge.svg?branch=main&event=push) ![](https://github.com/Sleepw4lker/TameMyCerts/actions/workflows/xunit.yml/badge.svg?branch=main&event=push) TameMyCerts is a [policy module](https://docs.microsoft.com/en-us/windows/win32/seccrypto/certificate-services-architecture) for Microsoft [Active Directory Certificate Services (AD CS)](https://docs.microsoft.com/en-us/windows/win32/seccrypto/certificate-services) enterprise certification authorities that enables security automation for a lot of use cases in the PKI field.