diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/build.yml similarity index 58% rename from .github/workflows/dotnet-desktop.yml rename to .github/workflows/build.yml index e1f3075..11eb86b 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ # Build DSIronPython package using msbuild name: DSIronPython-VS2022Build -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: build: runs-on: windows-2022 @@ -13,7 +13,7 @@ jobs: - name: Setup nuget uses: nuget/setup-nuget@v1.2 - name: Setup msbuild - uses: microsoft/setup-msbuild@v1.3 + uses: microsoft/setup-msbuild@v1.3.1 - name: Nuget Restore DSIronPython solution run: nuget restore ${{ github.workspace }}\DSIronPython\DSIronPython.sln - name: Build DSIronPython with MSBuild @@ -28,6 +28,18 @@ jobs: } else { Write-Error "python node dll was not found!" } - - name: Test with the dotnet CLI - run: dotnet test ${{ github.workspace }}\DSIronPython - + - name: Run test with the dotnet CLI + run: | + dotnet test ${{ github.workspace }}\DSIronPython --logger "trx;LogFileName=results.trx" --results-directory ${{ github.workspace }}\DSIronPython\TestResults + - name: Upload build artifact + uses: actions/upload-artifact@v3.1.3 + with: + name: DSIronPython + path: ${{ github.workspace }}\DSIronPython\package_output + retention-days: 7 + - name: Upload test artifact + uses: actions/upload-artifact@v3.1.3 + with: + name: TestResults + path: ${{ github.workspace }}\DSIronPython\TestResults + retention-days: 1 diff --git a/.github/workflows/publish_test_report.yml b/.github/workflows/publish_test_report.yml new file mode 100644 index 0000000..1cb9adb --- /dev/null +++ b/.github/workflows/publish_test_report.yml @@ -0,0 +1,25 @@ +name: Publish Test Report + +on: + workflow_run: + workflows: + - DSIronPython-VS2022Build + types: + - completed + +permissions: + contents: read + actions: read + checks: write + +jobs: + publish_test_report: + name: Publish Test Report + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v1.7.0 + with: + artifact: TestResults + name: Test Results + path: '*.trx' + reporter: dotnet-trx diff --git a/.gitignore b/.gitignore index 9491a2f..d4d380b 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ bld/ [Oo]ut/ [Ll]og/ [Ll]ogs/ +package_output/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -360,4 +361,4 @@ MigrationBackup/ .ionide/ # Fody - auto-generated XML schema -FodyWeavers.xsd \ No newline at end of file +FodyWeavers.xsd