Skip to content

Execute all the TestProject jobs in a specific project and ensure all pass.

Notifications You must be signed in to change notification settings

Mahan-F/test-project-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

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TestProject Job Execution

TestProject Job Execution is a Github action that can be used for running test jobs that are created via the TestProject platform. The action requires the application ID and API key to be able to call the TestProject APIs and execute all the tests that exist in the given project.

The action will first get a list of all jobs in the project, execute them, and then will check periodically the status of every job until all jobs are finished. If any job fails, the action will also fail so that the CI/CD pipeline does not continue.

Using the action

To use this action as part of your pipeline, add a new job for testing which will use this action and pass the required parameters project_id and api_key.

name: CI/CD Pipeline

on: 
  push: 
    branches:
      - production

jobs:
  test:
    name: CI Pipeline
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: TestProject Execute Jobs
        uses: Mahan-F/test-project-action@v1
        with:
          project_id: ${{ secrets.TEST_PROJECT_ID }}
          api_key: ${{ secrets.TEST_PROJECT_API_KEY }}

In the above snippet, the project_id and api_key are being fetched from the GitHub project secrets. For more information about how to add and manage project secrets, read the guide from GiHub Docs.

Parameters

project_id: The ID of the project on TestProject of which you want to execute tests for.

api_key: The API key of your TestProject account. Can be created here

check_interval: The interval in seconds of which the action should check the status of running tests. (Recommended to not make this too short so you will not be spamming TestProject APIs)

wait_for_tests: Whether the action should wait for the tests to complete (pass/fail) or if it should just start them and complete the action. (Default = true)

About

Execute all the TestProject jobs in a specific project and ensure all pass.

Resources

Stars

Watchers

Forks

Packages

No packages published