Skip to content

include README in nuget package #37

include README in nuget package

include README in nuget package #37

Workflow file for this run

name: Build and Test
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Configuration type to build
BUILD_CONFIGURATION: Debug
jobs:
test:
#needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
env:
COMMAND_DIR: 'ls -la'
COMMAND_COPY: 'cp'
COMMAND_MOVE: 'mv -f'
- os: macos-latest
runNetExe: mono
env:
COMMAND_DIR: 'ls -la'
COMMAND_COPY: 'cp'
COMMAND_MOVE: 'mv -f'
- os: windows-latest
env:
COMMAND_DIR: 'dir'
COMMAND_COPY: 'copy /y'
COMMAND_MOVE: 'move-item -force'
steps:
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Dir Listing
run: "${{matrix.env.COMMAND_DIR}}"
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration=${{env.BUILD_CONFIGURATION}} --no-restore
- name: Run NUnit3 tests
run: dotnet test NUnit3Test -v n --framework net8.0 --results-directory test-results --logger junit --configuration=${{env.BUILD_CONFIGURATION}} --no-restore
continue-on-error: true
- name: Collect NUnit3 test results
run: '${{matrix.env.COMMAND_MOVE}} "test-results/TestResults.xml" "FinalUnitTestOutputVerifyTests/previous-test-results/testresults.nunit3.xml"'
- name: Run xUnit tests
run: dotnet test xUnitTest -v n --framework net8.0 --results-directory test-results --logger junit --configuration=${{env.BUILD_CONFIGURATION}} --no-restore
continue-on-error: true
- name: Collect xUnit test results
run: '${{matrix.env.COMMAND_MOVE}} "test-results/TestResults.xml" "FinalUnitTestOutputVerifyTests/previous-test-results/testresults.xunit.xml"'
- name: Run final unit tests on output of previous unit tests
run: 'dotnet test FinalUnitTestOutputVerifyTests -v n --framework net8.0 --results-directory test-results --logger junit --configuration=${{env.BUILD_CONFIGURATION}} --no-restore'
- name: 'Dir Listing test-results'
if: always()
run: '${{matrix.env.COMMAND_DIR}} test-results'
#Following lines maybe required again after test&dev?!
# # the action is useless on pull_request events
# # (it can not create check runs or pull request comments)
# if: always() #&& startsWith(matrix.os, 'ubuntu') #&& github.event_name != 'pull_request'
- name: Unit Test Results (Linux)
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always() && startsWith(matrix.os, 'ubuntu')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: "test-results/TestResults.xml"
check_run_annotations: all tests
comment_title: Unit Test Statistics (${{matrix.os}})
check_name: Unit Test Results (${{matrix.os}})
report_individual_runs: true
- name: Unit Test Results (Mac)
uses: EnricoMi/publish-unit-test-result-action/macos@v2
if: always() && startsWith(matrix.os, 'macos')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: "test-results/TestResults.xml"
check_run_annotations: all tests
comment_title: Unit Test Statistics (${{matrix.os}})
check_name: Unit Test Results (${{matrix.os}})
report_individual_runs: true
- name: Unit Test Results (Win)
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always() && startsWith(matrix.os, 'windows')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: "test-results/TestResults.xml"
check_run_annotations: all tests
comment_title: Unit Test Statistics (${{matrix.os}})
check_name: Unit Test Results (${{matrix.os}})
report_individual_runs: true
- name: Publish Unit Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: NUnit Test Results ${{ matrix.os }}
path: |
test-results/TestResults.xml
FinalUnitTestOutputVerifyTests/previous-test-results/testresults.nunit3.xml
FinalUnitTestOutputVerifyTests/previous-test-results/testresults.xunit.xml