From f890bb6bf5b3d1e8bfd1327c1036403c528ca47c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 8 Nov 2024 14:21:26 +0700 Subject: [PATCH] Added framework matrix to build And attempting to save the path to the test folder, for each framework. --- .github/workflows/build.yml | 53 +++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d1920ed8..939ca33da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,13 @@ jobs: build: timeout-minutes: 60 runs-on: windows-latest + strategy: + fail-fast: false + matrix: + framework: [net462, net48, net8.0] + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.framework }} + cancel-in-progress: true steps: - name: Checkout code @@ -21,26 +28,32 @@ jobs: - name: Build project run: dotnet build -bl:build.binlog --configuration Release + - name: Get Path to Tests + run: echo "TEST_PATH=dotnet msbuild -p:TargetFrameworks=${{ matrix.framework }} --getProperty:OutputPath -p:Configuration=Release" >> "$GITHUB_ENV" + + - name: Print + run: echo "$TEST_PATH" + # there are cases where this will fail and we want to know about it # so we don't use continue-on-error, but we still want to publish the results - - name: Test project - id: test - run: dotnet test -bl:test.binlog --filter "TestCategory != SkipOnTeamCity" --blame-hang-timeout 5m --logger:"trx;LogFilePrefix=results" --results-directory ./test-results + # - name: Test project + # id: test + # run: dotnet test $TEST_PATH/SIL*Tests.dll -bl:test.binlog --filter "TestCategory != SkipOnTeamCity" --no-build --configuration Release --blame-hang-timeout 5m --logger:"trx;LogFilePrefix=results" --results-directory ./test-results - - name: Publish test results - if: ${{ !cancelled() && steps.test.outcome != 'skipped' }} - uses: EnricoMi/publish-unit-test-result-action/windows@v2 - with: - check_name: LibPalaso Tests - files: ./test-results/**/*.trx - action_fail: true - action_fail_on_inconclusive: true - - - name: Publish logs on failure - if: failure() - uses: actions/upload-artifact@v4 - with: - name: binary-logs - path: | - build.binlog - test.binlog \ No newline at end of file + # - name: Publish test results + # if: ${{ !cancelled() && steps.test.outcome != 'skipped' }} + # uses: EnricoMi/publish-unit-test-result-action/windows@v2 + # with: + # check_name: LibPalaso Tests + # files: ./test-results/**/*.trx + # action_fail: true + # action_fail_on_inconclusive: true + + # - name: Publish logs on failure + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: binary-logs + # path: | + # build.binlog + # test.binlog