File tree Expand file tree Collapse file tree 4 files changed +25
-12
lines changed
Expand file tree Collapse file tree 4 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 1414 id : configure
1515 - name : Install
1616 run : yarn
17- - name : Check Formatting
18- run : yarn format --check
19- - name : Typecheck
20- run : yarn typecheck
21- - name : Tests
22- run : yarn test
23- - name : Validate schemas
24- run : yarn test:schemas
25- - name : Validate examples
26- run : yarn test:examples
17+ - name : Check
18+ run : yarn ci
Original file line number Diff line number Diff line change @@ -16,6 +16,26 @@ $ yarn start
1616
1717This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1818
19+ ### Schema Validation
20+
21+ ``` shell
22+ # Check that the schemas in `schemas/` are valid
23+ $ yarn test:schemas
24+
25+ # Check that the examples in `examples/` match the schemas in `schemas/`
26+ $ yarn test:examples
27+ ```
28+
29+ ### Testing
30+
31+ ``` shell
32+ $ yarn ci
33+ # or
34+ $ yarn format --check
35+ $ yarn typecheck
36+ $ yarn test
37+ ```
38+
1939### Build
2040
2141```
Original file line number Diff line number Diff line change 1616 "typecheck" : " tsc" ,
1717 "test" : " jest" ,
1818 "test:schemas" : " ajv compile -s \" schemas/com.*.json\" --spec=draft2020 -c ajv-formats --strict=true -r \" schemas/cloudevents.json\" -r \" schemas/glides-events-schema.json\" " ,
19- "test:examples" : " ts-node src/scripts/validate_examples.ts"
19+ "test:examples" : " ts-node src/scripts/validate_examples.ts" ,
20+ "ci" : " yarn format --check && yarn typecheck && yarn test && yarn test:schemas && yarn test:examples"
2021 },
2122 "dependencies" : {
2223 "@docusaurus/core" : " 2.4.0" ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const viewerOptions = {
1313export default function EventSchemaPath ( props : { event : object } ) : JSX . Element {
1414 const [ error , setError ] = useState ( undefined ) ;
1515 const [ resolvedSchema , setResolvedSchema ] = useState ( undefined ) ;
16- const schemaRoot = useBaseUrl ( "/schemas" , { forcePrependBaseUrl : true } ) ;
16+ const schemaRoot = useBaseUrl ( "/schemas" , { forcePrependBaseUrl : true } ) ;
1717 useEffect ( ( ) => {
1818 fetch ( `${ schemaRoot } /${ props . event } .json` )
1919 . then ( ( result ) => result . json ( ) )
You can’t perform that action at this time.
0 commit comments