diff --git a/.github/workflows/Beckn-Core-Spec-Validator.yml b/.github/workflows/Beckn-Core-Spec-Validator.yml new file mode 100644 index 00000000..4d8ab06c --- /dev/null +++ b/.github/workflows/Beckn-Core-Spec-Validator.yml @@ -0,0 +1,30 @@ +name: Validate Beckn core spec meta, registry and transaction Schema against OpenAPI Specification + +on: + workflow_dispatch: # This allows manual trigger via GitHub UI + # pull_request: + # branches: + # - main + # push: + # branches: + # - draft + +jobs: + validate_beckn_schema: + name: Validate Beckn Schemas + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 16 + - name: install Beckn validator tool for spec + run: npm install -g beckn-spec-validator + - name: Validate meta file + run: beckn-spec-validator -b api/meta/build/meta.yaml -v false + - name: Validate registry file + run: beckn-spec-validator -b api/registry/build/registry.yaml -v false + - name: Validate transaction file + run: beckn-spec-validator -b api/transaction/build/transaction.yaml -v false \ No newline at end of file diff --git a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml new file mode 100644 index 00000000..fda48349 --- /dev/null +++ b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml @@ -0,0 +1,44 @@ +name: CI-RK + +on: + workflow_dispatch: # This allows manual trigger via GitHub UI + # change this to the branch you want to test this workflow on + # push: + # branches: + # - "master" + # - "draft" + # - "github-action" + # pull_request: + # branches: + # - "master" + # - "draft" + # - "github-action" + # paths: + # - "api/meta/build/meta.yaml" + # - "api/registry/build/registry.yaml" + # - "api/transaction/build/transaction.yaml" + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: "14" + + - name: Install openapi-cli + run: npm install -g @redocly/cli + + - name: Validate meta.yaml + run: openapi lint api/meta/build/meta.yaml + + - name: Validate registry.yaml + run: openapi lint api/registry/build/registry.yaml + + - name: Validate transaction.yaml + run: openapi lint api/transaction/build/transaction.yaml \ No newline at end of file diff --git a/.github/workflows/thiyagu.yaml b/.github/workflows/thiyagu.yaml new file mode 100644 index 00000000..fa7b74cf --- /dev/null +++ b/.github/workflows/thiyagu.yaml @@ -0,0 +1,69 @@ +name: Validate OpenAPI + +on: + pull_request: + branches: + - master + - draft + push: + branches: + - master + - github-action + +jobs: + validate_meta: + name: Meta OpenAPI Schema Validation + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for meta.yaml + run: openapi-validator ./api/meta/build/meta.yaml + + validate_registry: + name: Registry OpenAPI Schema Validation + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for registry.yaml + run: openapi-validator ./api/registry/build/registry.yaml + + validate_transaction: + name: Transaction OpenAPI Schema Validation + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for transaction.yaml + run: openapi-validator ./api/transaction/build/transaction.yaml \ No newline at end of file