Skip to content

Commit c7b5762

Browse files
committed
fix: add release jobs
1 parent 877d415 commit c7b5762

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

.github/workflows/build.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ dist
2929
bin/
3030
.nyc_output/
3131
coverage/
32-
/types
32+
/types
33+
34+
spectral/.openapi/

spectral/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"lint": "eslint src/**/*.ts",
1111
"publish": "npm publish dist",
1212
"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"
1415
},
1516
"dependencies": {
1617
"@stoplight/spectral": "^5.3.0"

spectral/scripts/rules.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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

0 commit comments

Comments
 (0)