Skip to content

Commit

Permalink
fix: updating parser deps in tests and adding simple PR validation (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Apr 14, 2020
1 parent c7a87d1 commit af7fba8
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 150 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
- name: Get version from package.json after release step
id: extractver
run: echo "::set-output name=version::$(npm run get-lib-version --silent)"
- name: Use latest version in the Playground #this will update package.json and a lock file for the playground that will also be pushed to PR with next step
if: steps.initversion.outputs.version != steps.extractver.outputs.version
run: npm install @kyma-project/asyncapi-react@${{ steps.extractver.outputs.version }} -s
working-directory: ./playground
- name: Create Pull Request with updated package files
if: steps.initversion.outputs.version != steps.extractver.outputs.version
uses: peter-evans/create-pull-request@v2.4.4
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/simple-pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Simple PR Validation

on:
pull_request

jobs:

test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 13
- name: Install dependencies
run: npm install
- name: Bootstrap the project
run: npm run bootstrap
- name: Run library tests
run: npm test
2 changes: 1 addition & 1 deletion library/src/containers/AsyncApi/AsyncApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '../../types';
import { ConfigInterface, defaultConfig } from '../../config';
import { beautifier, bemClasses, stateHelpers, Parser } from '../../helpers';
import { parse, parseFromUrl } from 'asyncapi-parser';
import { parse, parseFromUrl } from '@asyncapi/parser';
import { CSS_PREFIX } from '../../constants';
import { useExpandedContext, useChangeHashContext } from '../../store';

Expand Down
2 changes: 1 addition & 1 deletion library/src/helpers/__tests__/parser.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ParserErrorUnsupportedVersion,
ParserErrorNoJS,
} from 'asyncapi-parser';
} from '@asyncapi/parser';
import { Options as ParserOptions } from 'json-schema-ref-parser';

import { Parser } from '../parser';
Expand Down
2 changes: 1 addition & 1 deletion library/src/helpers/parser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ParserErrorUnsupportedVersion,
ParserErrorNoJS,
} from 'asyncapi-parser';
} from '@asyncapi/parser';
import { Options as ParserOptions } from 'json-schema-ref-parser';

import { ParserReturn, FetchingSchemaInterface } from '../types';
Expand Down
4 changes: 2 additions & 2 deletions library/src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module 'asyncapi-parser';
declare module 'asyncapi-parser/lib/parser';
declare module '@asyncapi/parser';
declare module '@asyncapi/parser/lib/parser';
declare module 'merge';
declare module 'openapi-sampler';
Loading

0 comments on commit af7fba8

Please sign in to comment.