Bumped .net version to the latest LTS and upgraded dependencies versions #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build project | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
build_and_test: | |
name: 'Build & Test' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup dotnet core | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore -s https://api.nuget.org/v3/index.json | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --verbosity normal --logger "trx;LogFileName=test-results.trx" MiHomeUnitTests | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() | |
with: | |
name: xUnit Tests | |
path: MiHomeUnitTests/TestResults/test-results.trx | |
reporter: dotnet-trx | |
- name: Get test report results | |
run: echo "PASSED=$(cat MiHomeUnitTests/TestResults/test-results.trx | grep passed | awk '{print $4}' | awk -F= '{print $2}' | sed "s/\"//g")" >> $GITHUB_ENV && echo "FAILED=$(cat MiHomeUnitTests/TestResults/test-results.trx | grep failed | awk '{print $5}' | awk -F= '{print $2}' | sed "s/\"//g")" >> $GITHUB_ENV | |
- name: Print test results | |
run: echo ${{ env.PASSED }} passed ${{ env.FAILED }} failed | |
- name: Create the Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.GIST_SECRET }} | |
gistID: d70d7e06eb53484b7514bfd63cec6885 | |
filename: test_results.json | |
label: tests | |
message: ${{ env.PASSED }} passed ${{ env.FAILED }} failed | |
color: green | |