GithubHelp home page GithubHelp logo

rwx-research_upload-captain-artifact's Introduction

Upload Captain Artifact

⚠️ This Action is deprecated. ⚠️

See the latest documentation at https://www.rwx.com/captain/docs/test-suite-integration

Deprecated Documentation

This action uploads test results to Captain.

Captain provides observability and tooling compatible with your existing CI platform and testing frameworks. Use it for faster and more reliable builds, and happier and more productive engineers.

You'll need an Access Token to use this Action. Set it as a secret in your repo. Conventionally, we call this secret RWX_ACCESS_TOKEN. More documentation on access tokens here.

Configure Test Framework

Before you can upload your test results, you'll need to configure your test framework to write the test results to a file. Here's the documentation for how to configure reporters in several of the most popular testing frameworks. We're working on building support for additional frameworks. If you'd like us to prioritize any one in particular, please let us know.

Usage

Once you have your test framework configured to write its test results to a file, you're ready to upload them into Captain.

- uses: rwx-research/upload-captain-artifact@v1

  # You should configure the build step to run even if the test suite fails by adding `if: always()`.
  # This will enable Captain to provide functionality related to test failures, such as identifying flaky tests.
  if: always()

  # We also recommend setting `continue-on-error: true` so that any errors uploading test results
  # will not cause your entire build to fail.
  continue-on-error: true

  with:
    # Required.
    # this is a json array of objects with fields...
    # - name: how the artifact will be shown in captain
    # - path: path to test result. This field supports bash globbing (e.g. **/*).
    # - kind: for now, this should always be "test_results"
    # - parser: one of
    #   - cypress_junit_xml
    #   - jest_json
    #   - junit_xml
    #   - rspec_json
    #   - xunit_dot_net_xml
    artifacts: |
      [
        {
          "name": "",
          "path": ""
          "kind": "test_results",
          "parser": ""
        }
      ]

    # Required.
    # https://www.rwx.com/docs/access-tokens
    captain-token: '${{ secrets.RWX_ACCESS_TOKEN }}'

    # This is required if you set the `name` property on your job.
    # If you provided a name, set that same value here.
    job-name: ''

    # This is required if you are running the action as part of a matrix build.
    # Without it, we won't be able to find the job to associate your artifacts.
    # If you're not sure, you can always safely set this even if you aren't using a matrix.
    job-matrix: '${{ toJSON(matrix) }}'

    # Optional.
    # The behavior of the action when an artifact's file is not found.
    #
    #  Options:
    #    - ignore: Output neither a warning nor an error; the action will succeed.
    #    - warn (default): Output a warning; the action will succeed.
    #    - error: Output an error; the action will fail.
    if-files-not-found: ''

Example

- name: Upload test results to Captain
  uses: rwx-research/upload-captain-artifact@v1
  if: always()
  continue-on-error: true
  with:
    artifacts: |
      [
        {
          "name": "RSpec",
          "path": "tmp/**/rspec.json",
          "kind": "test_results",
          "parser": "rspec_json"
        }
      ]
    captain-token: '${{ secrets.RWX_ACCESS_TOKEN }}'

rwx-research_upload-captain-artifact's People

Contributors

dan-manges avatar dependabot[bot] avatar kylekthompson avatar michaelglass avatar renovate[bot] avatar tagraves avatar tonywok avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.