Skip to content

launchableinc/record-build-and-test-results-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

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Launchable record build and test results action

Launchable is a software development intelligence platform currently focused on continuous integration (CI). Using data from your CI runs, Launchable provides various features to speed up your testing workflow so you can ship high quality software faster.

This action sends test results and Git commit graph changes from your GitHub Actions workflow to your Launchable workspace so you can use Launchable's features including:

  1. Test Notifications
  2. Test Insights
  3. Predictive Test Selection

Usage

  1. Create an API key on the Settings page of your Launchable workspace.
  2. Create an encrypted secret called LAUNCHABLE_TOKEN with your Launchable API key as its value.
  3. Update your actions/checkout usage if needed (see below).
  4. Add this action to your workflow. Add it after you run tests, like in the example below.
  5. Add the with:, if:, and env: sections as shown below.
  6. Set your test_runner and report_path values per this doc.
  7. Run the workflow.
  8. If successful, you should see a link to the Launchable dashboard in the console output of the action.

Note: Depending on your test runner, you might need to modify your test runner command to ensure it creates test reports that Launchable accepts per this doc.

name: Test

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  LAUNCHABLE_DEBUG: 1
  LAUNCHABLE_REPORT_ERROR: 1

jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Test
        run: <YOUR TEST COMMAND HERE>
      - name: Record build and test results action
        uses: launchableinc/record-build-and-test-results-action@v1.0.0
        with:
          report_path: .
          test_runner: <YOUR TEST RUNNER HERE>
        if: always()
        env:
          LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN }}

Usage with actions/checkout

If you use actions/checkout, set fetch-depth: 0 as shown in the example below. Without this setting, Launchable will not receive information about all your commits.

    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

Example

Refer to go-test example for example use of the action.

Inputs

Required

test_runner

The name of your test runner. Our supported test runners are here.

report_path

Path to the test report(s) generated by your test runner. Refer to here for examples.

Note: Depending on your test runner, you might need to modify your test runner command to ensure it creates test reports that Launchable accepts per this doc.

Optional

source_path

Path to a local Git repository/workspace. Default ..

build_name

Build name that you can give to the current software. Default is the Git SHA revealed by GitHub Actions.

max_days

The maximum number of days to collect commits retroactively. Default 30.

no_submodules

Flag to stop collecting build information from Git Submodules. Default false, which means the submodules are collected.

no_build

Flag to record test session without recording build. Default false, which means the build is recorded.

python_version

Python version for the Launchable CLI to use. Default is 3.10. Change this if your workflow requires a specific Python version.

License

Launchable data collection action is licensed under Apache license.