The following sample GitHub Actions performs the following tasks:
- Checks out branch
- Downloads Setup Inso
- Runs linting
- Runs legacy unit tests
Here’s the example Inso CLI GitHub Action:
v13.3+ inso run test runs legacy unit tests, which are hidden in the app by default and are planned for deprecation in a future release. To create or edit these tests in Insomnia, go to Preferences > General > Application and enable Show legacy unit tests. For new work, use pre-request and after-response scripts and run them with inso run collection.
name: Test
jobs:
Linux:
name: Validate API spec
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v1
- uses: kong/setup-inso@v2
with:
inso-version: 11.3.0
- name: Lint
run: inso lint spec "Designer Demo" --ci
- name: Run test suites
run: inso run test "Designer Demo" --env UnitTest --ci