File tree Expand file tree Collapse file tree 6 files changed +88
-6
lines changed Expand file tree Collapse file tree 6 files changed +88
-6
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
1
+ name : npm-publish
2
+ on :
3
+ push :
4
+ tags :
5
+ - " *"
6
+ jobs :
7
+ npm-publish :
8
+ name : npm-publish
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v3
13
+ - name : Use Node.js 16.3.0
14
+ uses : actions/setup-node@v3
15
+ with :
16
+ node-version : 16.3.0
17
+ registry-url : " https://registry.npmjs.org"
18
+ - run : yarn install
19
+ - run : yarn build
20
+ - name : Inject slug/short variables
21
+ uses : rlespinasse/github-slug-action@v4
22
+ - name : Validate Tag
23
+ run : yarn semver $GITHUB_REF_SLUG
24
+ - name : Update versions of packages
25
+ run : yarn setupRelease $GITHUB_REF_SLUG
26
+ - name : Publish packages
27
+ run : npm publish --workspace=packages
28
+ env :
29
+ NODE_AUTH_TOKEN : ${{ secrets.RHOAS_NPM_TOKEN }} #
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 1
1
{
2
- "extends" : [
3
- " config:base"
4
- ]
5
- }
2
+ "extends" : [ " github>redhat-developer/app-services-renovate-config" ],
3
+ "postUpdateOptions" : [
4
+ " gomodTidy"
5
+ ],
6
+ "ignoreDeps" : [" github.com/redhat-developer/service-binding-operator" ]
7
+ }
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