Skip to content

rasunkar/publishtestresults-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Publish Test Results GitHub Action

This action was created to upload test results either in TRX or JUNIT format to Azure DevOps from a GitHub workflow using Azure DevOps Publish Test Results task. Most of the commonly used properties in the Azure DevOps Publish Test Results task map to properties of this GitHub action. Like the Azure DevOps Publish Test Results task, this action only supports Windows but NOT Linux.

Due to the unavailability of a Test results UI, test results are displayed in the console logs of the action.

Usage

See action.yml

Example

jobs:
  my_action_job:
    runs-on: windows-latest
    name: A job to run VSTest
    steps:
      - name: Download tests binary zip
        run: powershell Invoke-WebRequest -Uri "https://localworker.blob.core.windows.net/win-x64/tests.zip" -OutFile "./tests.zip"
      - name: Unzip tests binary
        run: powershell Expand-Archive -Path tests.zip -DestinationPath ./
      - name: Run tests
        uses: microsoft-approved-actions/vstest@master
        with:
          testAssembly: CloudTest.DefaultSamples*.dll
          searchFolder: ./tests/
          runInParallel: true
      - name: Publish Test Results
        uses: rasunkar/[email protected]
        id: PublishTestResults
        with:
            testResultsFormat: 'VSTest'
            testResultsFiles: '**/*.trx'
            searchFolder: ${{ github.workspace }}
            mergeTestResults: true
            testRunTitle: "GitHub#TestResults#"
            failTaskOnFailedTests: false
            adoOrganizationName: "rasunkar"
            adoProjectName: "ADO TCM"
        env:
          ADO_ACCESS_TOKEN: ${{ secrets.ADO_ACCESS_TOKEN }}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published