forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add api-extractor report (opensearch-project#662)
This commit activates the api-extractor report allowing a semi-automated check about possible breaking changes on the current published API contract. The extractor outputs a Markdown report file called `api/charts.api.md`. This file shows all the public/beta/alpha type/interface/function exposed as part of our public API (visible when importing elastic/charts into a project). It includes a set of warnings related to missing tags or wrongly used tags. This commit adds also a GH workflow that runs the `yarn api:check` commands as a GH check and warns the PR author about possible changes of the current API document.
- Loading branch information
Showing
18 changed files
with
1,768 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.json linguist-language=JSON-with-Comments |
26 changes: 26 additions & 0 deletions
26
packages/osd-charts/.github/workflows/api_extractor_check.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Check for API changes | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
api-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10.x' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Run API-Extractor | ||
run: yarn api:check | ||
- name: API-Extractor failure | ||
if: ${{ failure() }} | ||
uses: LouisBrunner/[email protected] | ||
with: | ||
old: api/charts.api.md | ||
new: tmp/charts.api.md | ||
mode: deletion | ||
tolerance: better |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.