6 Commits

Author SHA1 Message Date
Felix Weiß
d5b701186e Fixed caching again 2023-06-16 14:36:49 +02:00
Felix Weiß
0702ab7d0a Fixed caching 2023-06-16 14:32:54 +02:00
Felix Weiß
5adadbfc46 fixed caching 2023-06-16 14:24:16 +02:00
Felix Weiß
739f83bf0c Merge branch 'master' of https://github.com/WOmed/MewtocolNet 2023-06-16 14:19:05 +02:00
Felix Weiß
a9bd792af1 added test result saving 2023-06-16 14:18:51 +02:00
Felix Weiß
e6ffc92db6 Update README.md 2023-06-16 12:21:41 +02:00
3 changed files with 30 additions and 5 deletions

View File

@@ -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,21 @@ jobs:
asset_path: ${{ github.workspace }}/Builds/Mewtocol.NET.${{ env.VERSION }}.nupkg
asset_name: Mewtocol.NET.${{ env.VERSION }}.nupkg
asset_content_type: application/zip
- name: Load cached test results
uses: actions/cache/restore@v3
with:
key: coverage-data
path: |
${{ github.workspace }}/MewtocolTests/TestResults
- 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/TestResults/coverage.opencover.xml'
asset_name: coverage.opencover.xml
asset_content_type: application/xml

View File

@@ -41,10 +41,17 @@ jobs:
- name: 'Run tests'
run: |
cd '${{ github.workspace }}/MewtocolTests'
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./TestResults/
#Upload to codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Cache test results
uses: actions/cache/save@v3
with:
key: coverage-data
path: |
${{ github.workspace }}/MewtocolTests/TestResults

View File

@@ -1,4 +1,5 @@
[![Build pipeline](https://github.com/WOmed/MewtocolNet/actions/workflows/build-pipeline.yml/badge.svg)](https://github.com/WOmed/MewtocolNet/actions/workflows/build-pipeline.yml)
[![Publish pipeline](https://github.com/WOmed/MewtocolNet/actions/workflows/publish-pipeline.yml/badge.svg)](https://github.com/WOmed/MewtocolNet/actions/workflows/publish-pipeline.yml)
[![Test pipeline](https://github.com/WOmed/MewtocolNet/actions/workflows/test-pipeline.yml/badge.svg)](https://github.com/WOmed/MewtocolNet/actions/workflows/test-pipeline.yml)
[![Nuget](https://img.shields.io/nuget/v/Mewtocol.NET)](https://www.nuget.org/packages/Mewtocol.NET)
[![codecov](https://codecov.io/gh/WOmed/MewtocolNet/branch/master/graph/badge.svg?token=M50U8EZPC6)](https://codecov.io/gh/WOmed/MewtocolNet)
![GitHub](https://img.shields.io/github/license/WOmed/MewtocolNet)