From 657c3f1be3f415d6f0d0ad88d77838c4c58ba9fd Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 27 Nov 2023 14:04:26 +0100 Subject: [PATCH] Debug feature test junit logging on CI On CI the feature tests run but do not produce a valid junit-*.xml file. Running this locally however does create the proper output file. This temporarily adds an isolated step to debug whats missing on CI --- .github/workflows/test-linux.yml | 11 +++++++++-- .github/workflows/test/action.yml | 6 +++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 98c8501b8..b293b358f 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -60,11 +60,18 @@ jobs: shell: bash run: dotnet build -c Release --verbosity minimal - - name: 'Tests: Unit' + - name: 'Tests: Feature Tests' uses: ./.github/workflows/test with: name: 'unit' - filter: 'FullyQualifiedName!~Elastic.Apm.StartupHook.Tests&FullyQualifiedName!~Elastic.Apm.Profiler.Managed.Tests&FullyQualifiedName!~Elastic.Apm.Azure' + filter: 'FullyQualifiedName~Elastic.Apm.Feature.Tests' + verbosity: detailed + + - name: 'Tests: Unit' + uses: ./.github/workflows/test + with: + name: 'unit' + filter: 'FullyQualifiedName!~Elastic.Apm.StartupHook.Tests&FullyQualifiedName!~Elastic.Apm.Profiler.Managed.Tests&FullyQualifiedName!~Elastic.Apm.Azure' azure-tests: runs-on: ubuntu-latest diff --git a/.github/workflows/test/action.yml b/.github/workflows/test/action.yml index 9ae666de2..6828ba5d9 100644 --- a/.github/workflows/test/action.yml +++ b/.github/workflows/test/action.yml @@ -17,6 +17,10 @@ inputs: description: 'test filter to select tests from solution projects' required: false default: 'net7.0' + verbosity: + description: 'logging verbosity' + required: false + default: 'minimal' runs: using: "composite" @@ -25,7 +29,7 @@ runs: shell: bash run: | dotnet test -c Release ${{ inputs.project }} --no-build \ - --verbosity minimal \ + --verbosity ${{ inputs.verbosity }} \ ${{ inputs.filter != '' && format('--filter "{0}"', inputs.filter) || '' }} \ ${{ inputs.framework != '' && format('-f {0}', inputs.framework) || '' }} \ --logger:"junit;LogFilePath=${GITHUB_WORKSPACE}/build/output/junit-${{ inputs.name }}-${{ runner.os == 'Linux' && 'linux' || 'windows' }}-{framework}-{assembly}.xml;MethodFormat=Class;FailureBodyFormat=Verbose" \