File tree Expand file tree Collapse file tree 4 files changed +53
-2
lines changed Expand file tree Collapse file tree 4 files changed +53
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : SDK PR verification and build
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ paths :
7
+ - " spectral/"
8
+ pull_request :
9
+ branches : [ main ]
10
+ paths :
11
+ - " spectral/"
12
+
13
+ jobs :
14
+ rules-build :
15
+ runs-on : ubuntu-latest
16
+ strategy :
17
+ matrix :
18
+ node-version : [14.x]
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - name : Use Node.js ${{ matrix.node-version }}
22
+ uses : actions/setup-node@v3
23
+ with :
24
+ node-version : ${{ matrix.node-version }}
25
+ - run : yarn install
26
+ - working-directory : ./spectral
27
+ run : yarn build
28
+ - working-directory : ./spectral
29
+ run : yarn lint
30
+ - working-directory : ./spectral
31
+ run : yarn cli-integration-tests
32
+
33
+
34
+
Original file line number Diff line number Diff line change 29
29
bin /
30
30
.nyc_output /
31
31
coverage /
32
- /types
32
+ /types
33
+
34
+ spectral /.openapi /
Original file line number Diff line number Diff line change 10
10
"lint" : " eslint src/**/*.ts" ,
11
11
"publish" : " npm publish dist" ,
12
12
"copy-ruleset" : " cp ./ruleset.yaml ./dist/ruleset.yaml && cp ./package.json ./dist/package.json" ,
13
- "spectral-lint" : " spectral lint --ruleset ./examples/.spectral-local.yaml"
13
+ "spectral-lint" : " spectral lint --ruleset ./examples/.spectral-local.yaml" ,
14
+ "cli-integration-tests" : " ./scripts/rules.sh"
14
15
},
15
16
"dependencies" : {
16
17
"@stoplight/spectral" : " ^5.3.0"
Original file line number Diff line number Diff line change
1
+ # # This script tests and validates rules APIs
2
+
3
+ # # Fetch current managed services APIS from sdk repository
4
+ # # This apis can be used for testing
5
+ # # Script needs to run in the test working directory
6
+
7
+
8
+ echo " fetching kas-fleet-manager from main"
9
+ mkdir -R .openapi
10
+ wget -P .openapi https://raw.githubusercontent.com/redhat-developer/app-services-sdk-js/main/.openapi/kas-fleet-manager.yaml
11
+
12
+ # # TODO add more apis
13
+
14
+ yarn spectral lint .openapi/kas-fleet-manager.yaml -v -r ../dist/ruleset.yaml
You can’t perform that action at this time.
0 commit comments