From a9bd792af16c117d4bf100566761a2fd4a7617f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Wei=C3=9F?= <72068105+Sandoun@users.noreply.github.com> Date: Fri, 16 Jun 2023 14:18:51 +0200 Subject: [PATCH] added test result saving --- .github/workflows/publish-pipeline.yml | 19 +++++++++++++++++-- .github/workflows/test-pipeline.yml | 9 ++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-pipeline.yml b/.github/workflows/publish-pipeline.yml index d542d90..a644a78 100644 --- a/.github/workflows/publish-pipeline.yml +++ b/.github/workflows/publish-pipeline.yml @@ -51,7 +51,7 @@ jobs: ls -l dotnet nuget push "*.nupkg" --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/WOmed/index.json" - - name: 'Upload artifacts to latest release' + - name: 'Upload package to latest release' uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} @@ -60,4 +60,19 @@ jobs: asset_path: ${{ github.workspace }}/Builds/Mewtocol.NET.${{ env.VERSION }}.nupkg asset_name: Mewtocol.NET.${{ env.VERSION }}.nupkg asset_content_type: application/zip - \ No newline at end of file + + - name: Load cached test results + uses: actions/cache@v3 + with: + restore-keys: coverage-xml + + - name: 'Upload coverage xml to latest release' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: "${{ github.event.release.upload_url }}" + asset_path: '${{ github.workspace }}/MewtocolTests/coverage.opencover.xml' + asset_name: coverage.opencover.xml + asset_content_type: application/xml + \ No newline at end of file diff --git a/.github/workflows/test-pipeline.yml b/.github/workflows/test-pipeline.yml index e176aee..5eec664 100644 --- a/.github/workflows/test-pipeline.yml +++ b/.github/workflows/test-pipeline.yml @@ -47,4 +47,11 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Cache test results + uses: actions/cache@v3 + with: + key: coverage-xml + path: | + '${{ github.workspace }}/MewtocolTests/coverage.opencover.xml' \ No newline at end of file