12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- name: openapi-diff
- on:
- pull_request:
- concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: true
- env:
- SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
- jobs:
- check-diff:
- name: build api
- runs-on: ubuntu-22.04
- timeout-minutes: 90
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- - name: Check for python file changes
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd
- id: changes
- with:
- token: ${{ github.token }}
- filters: .github/file-filters.yml
- - name: Setup sentry env
- uses: ./.github/actions/setup-sentry
- if: steps.changes.outputs.api_docs == 'true'
- - name: Checkout getsentry/sentry-api-schema
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- if: steps.changes.outputs.api_docs == 'true'
- with:
- ref: 'main'
- repository: getsentry/sentry-api-schema
- path: sentry-api-schema
- - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
- id: setup-node
- with:
- node-version-file: '.volta.json'
- - name: Build OpenAPI Derefed JSON
- if: steps.changes.outputs.api_docs == 'true'
-
-
-
- run: |
- yarn add ts-node && make build-api-docs
- - name: Compare OpenAPI Derefed JSON
- if: steps.changes.outputs.api_docs == 'true'
- run: |
- npx json-diff@0.5.4 --color sentry-api-schema/openapi-derefed.json tests/apidocs/openapi-derefed.json
- - name: Dump RPC schema for new version
- id: newschema
- if: steps.changes.outputs.api_docs == 'true'
- run: |
- mkdir schemas
- sentry rpcschema > rpc_method_schema.json
- - name: Output RPC schema comparison
- uses: oasdiff/oasdiff-action/breaking@a2ff6682b27d175162a74c09ace8771bd3d512f8
- if: steps.changes.outputs.api_docs == 'true'
- with:
- base: sentry-api-schema/rpc_method_schema.json
- revision: ./rpc_method_schema.json
- fail-on: WARN
|