Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Testlight GitHub Action

Run Multimeter (.mmt) API tests, test suites, and generate documentation in GitHub Actions.

This is the Marketplace listing for Testlight. The same composite action also lives in the Multimeter repo at .github/actions/testlight.

Usage

- uses: actions/checkout@v4
- uses: mshobeyri/testlight-action@v1
  with:
    file: tests/suite.mmt
    env-file: tests/env.mmt
    preset: ci
    report: junit
    report-file: results/junit.xml

Docs: Install Testlight · Run in CI

Inputs

Input Required Default Description
file Yes Path to the .mmt file
command No run run, doc, or print-js
env-file No Path to environment file
preset No Preset name from env file
env No Environment variables (KEY=VALUE pairs)
input No Input variables (KEY=VALUE pairs)
example No Specific example name or index
report No Report format: junit, html, md, mmt
report-file No Custom report output path. Parent directories are created.
out No Write result JSON to file. Parent directories are created.
quiet No false Minimal output
log-level No error, warn, info, debug, trace
version No latest mmt-testlight version to install (latest, beta, rc, or X.Y.Z)
working-directory No . Working directory

Outputs

Output Description
result Path to result JSON (when out is set)
report Path to report file (when report-file is set)
exit-code Exit code of testlight

Examples

Basic test run

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run tests
        uses: mshobeyri/testlight-action@v1
        with:
          file: tests/suite.mmt

With JUnit report upload

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run tests
        uses: mshobeyri/testlight-action@v1
        with:
          file: tests/suite.mmt
          env-file: tests/env.mmt
          preset: ci
          report: junit
          report-file: results/junit.xml

      - name: Upload test results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: test-results
          path: results/junit.xml

Generate API documentation

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Generate docs
        uses: mshobeyri/testlight-action@v1
        with:
          command: doc
          file: api/catalog.mmt
          out: public/api-docs.html

License

Apache License 2.0. See LICENSE.md.

About

GitHub Action to run Multimeter (.mmt) API tests, suites, and docs with Testlight

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors