mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Github actions inso readme (#2374)
This commit is contained in:
parent
2d41dad701
commit
0c13f1598e
@ -132,6 +132,34 @@ inso run test spc_46c5a4 --reporter progress --bail --keep-file
|
||||
More examples: [#2338](https://github.com/Kong/insomnia/pull/2338).
|
||||
</details>
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
`inso` has been designed to run in a CI environment, disabling prompts and providing exit codes to pass or fail the CI workflow accordingly. An example workflow run in Github Actions is as follows. This example will checkout > install NodeJS > install inso > run linting > run unit tests > generate configuration. If any of these steps fail, the GH workflow will as well.
|
||||
|
||||
```yaml
|
||||
# .github/workflows/test.yml
|
||||
|
||||
name: Test
|
||||
|
||||
jobs:
|
||||
Linux:
|
||||
name: Validate API spec
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v1
|
||||
- name: Install NodeJS
|
||||
uses: actions/setup-node@v1
|
||||
- name: Install inso
|
||||
run: npm install -g insomnia-inso
|
||||
- name: Lint
|
||||
run: inso lint spec "Designer Demo" --ci
|
||||
- name: Run test suites
|
||||
run: inso run test "Designer Demo" --env UnitTest --ci
|
||||
- name: Generate declarative config
|
||||
run: inso generate config "Designer Demo" --type declarative --ci
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
* Bootstrap: `npm run bootstrap`
|
||||
|
Loading…
Reference in New Issue
Block a user