Skip to content

mockoon/cli-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

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation




@Mockoon/cli GitHub Action

Mockoon is the easiest and quickest way to design and run mock APIs. No remote deployment, no account required, free and open-source.

It combines a desktop application to design and run mock servers locally, and a CLI to self-host your fake APIs. A cloud is also available to collaborate with your team, keep your data in sync, and deploy your mock APIs.

API mocking helps you speed up development and third-party API integration by reducing dependency on external services and their limitations: rate limits, costs, availability, etc. It also allows you to test your applications in a controlled environment with predictable responses, status codes, and latencies, and easily simulate edge cases and error scenarios. Finally, you can onboard new team members faster by providing them with a consistent and reliable environment to test and develop their applications.

➡️ Download

GitHub Action Usage

Mockoon CLI, being a JavaScript application, can run on any environment where Node.js is installed, including continuous integration systems like GitHub Actions.

This GitHub Action allows you to run Mockoon CLI in your workflows.

Several parameters are available to customize the behavior of the action:

  • The version of the CLI, default to latest.
  • The data-file, pointing to a Mockoon data file stored in the repository.
  • A port on which the mock server will run, default to 3000.
name: Mockoon CLI demo

on:
  push:
    branches:
      - main

jobs:
  mockoon-cli-demo:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run Mockoon CLI
        uses: mockoon/cli-action@v2
        with:
          # Mockoon CLI version, default to 'latest'
          version: "latest"
          # Mockoon local data file or URL
          data-file: "./mockoon-data.json"
          # port, default to 3000
          port: 3000
      - name: Make test call
        run: curl -X GET http://localhost:3000/endpoint

Mockoon version compatibility

This action is compatible with the following Mockoon CLI versions:

Mockoon CLI version Action version
<6.0.0 v1
>=6.0.0 v2

CLI's documentation

Mockoon CLI is available as an NPM package. Please check our dedicated documentation to learn how to install and use it.

Subscribe to Mockoon Cloud

With advanced features for solo developers and teams, Mockoon Cloud supercharges your API development:

Upgrade today and take your API development to the next level.

cloud button

Mockoon's documentation

You will find Mockoon's documentation on the official website. It covers Mockoon's most complex features. Feel free to contribute or ask for new topics to be covered.

Changelogs

You will find Mockoon applications changelogs on the official website.

Support/feedback

You can discuss all things related to Mockoon and ask for help on the official community. It's also a good place to discuss bugs and feature requests before opening an issue on this repository. For more chat-like discussions, you can also join our Discord server.

Contributing

If you are interested in contributing to Mockoon, please take a look at the contributing guidelines.

Please also take a look at our Code of Conduct.

Roadmap

If you want to know what will be coming in the next release you can check the global Roadmap.

New releases will be announced on Mockoon's Twitter account @GetMockoon and through the newsletter to which you can subscribe here.