|
| 1 | +name: 'Upload CI artifacts' |
| 2 | +description: 'Uploads artifacts from a CI run (full build and test), following a full test run' |
| 3 | +inputs: |
| 4 | + configuration: |
| 5 | + description: 'The .NET configuration' |
| 6 | + default: 'Debug' |
| 7 | + tfm: |
| 8 | + description: 'The .NET Target Framework Moniker' |
| 9 | + required: true |
| 10 | + |
| 11 | +runs: |
| 12 | + using: 'composite' |
| 13 | + steps: |
| 14 | + - name: Upload .NET test results artifacts |
| 15 | + uses: actions/upload-artifact@v7 |
| 16 | + with: |
| 17 | + name: NUnit test results |
| 18 | + path: Tests/*.Tests/**/TestResults.xml |
| 19 | + - name: Upload verbose webdriver log artifacts |
| 20 | + # This step is only relevant if the ChromeDriver with verbose logging is selected, such as via |
| 21 | + # appsettings.json in CSF.Screenplay.Selenium.Tests. |
| 22 | + # If verbose logs aren't created then this step is skipped to avoid a build warning about missing artifacts. |
| 23 | + if: ${{ hashFiles('**/chrome-verbose-log.txt') != '' }} |
| 24 | + uses: actions/upload-artifact@v7 |
| 25 | + with: |
| 26 | + name: Verbose webdriver logs |
| 27 | + path: '**/chrome-verbose-log.txt' |
| 28 | + - name: Upload JS test results artifacts |
| 29 | + uses: actions/upload-artifact@v7 |
| 30 | + with: |
| 31 | + name: Client script test results |
| 32 | + path: CSF.Screenplay.JsonToHtmlReport.Template/src/TestResults/**/* |
| 33 | + - name: Upload Screenplay JSON report artifact |
| 34 | + uses: actions/upload-artifact@v7 |
| 35 | + with: |
| 36 | + name: Screenplay JSON reports |
| 37 | + path: Tests/**/ScreenplayReport.json |
| 38 | + - name: Convert Screenplay reports to HTML |
| 39 | + continue-on-error: true |
| 40 | + run: | |
| 41 | + for report in $(find Tests/ -type f -name "ScreenplayReport.json") |
| 42 | + do |
| 43 | + reportDir=$(dirname "$report") |
| 44 | + outputFile="$reportDir/ScreenplayReport.html" |
| 45 | + dotnet run --no-build --framework ${{ inputs.tfm }} -c ${{ inputs.configuration }} --project CSF.Screenplay.JsonToHtmlReport --ReportPath "$report" --OutputPath "$outputFile" |
| 46 | + done |
| 47 | + - name: Upload Screenplay HTML report artifact |
| 48 | + uses: actions/upload-artifact@v7 |
| 49 | + with: |
| 50 | + name: Screenplay HTML reports |
| 51 | + path: Tests/**/ScreenplayReport.html |
0 commit comments