Skip to content

Commit

Permalink
Github workflow - Testing action (#1)
Browse files Browse the repository at this point in the history
* Added Github action for automatic testing

Co-authored-by: Tim <>
  • Loading branch information
thim81 authored Jan 18, 2022
1 parent 5c51c17 commit 87d627a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ jobs:
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
# publish-npm:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# registry-url: https://registry.npmjs.org/
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.npm_token}}

# publish-gpr:
# needs: build
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Node Tests CI
on: [ push ]
jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ '12', '14', '16' ]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install Dependencies
run: npm ci

- name: Run Unit Tests
run: npm run test
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ control systems.
example:

```shell
$ asyncapi-format asyncapi.json --configFil asyncapi-format-options.json
$ asyncapi-format asyncapi.json --configFile asyncapi-format-options.json
```

The formatting will happen based on all the options set in the `asyncapi-format-options.json` file. All the
Expand Down

0 comments on commit 87d627a

Please sign in to comment.