Splitting summary and description in OpenAPI output #895
Workflow file for this run
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
name: Validate APIs | |
on: | |
pull_request: | |
paths: | |
- 'specification/**' | |
- '!specification/_types/**' | |
- '!specification/_spec_utils/**' | |
- '!specification/_doc_ids/**' | |
- '!specification/_json_spec/**' | |
branches: | |
- main | |
jobs: | |
validate-pr: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check pull request was opened from branch | |
if: github.event.pull_request.head.repo.full_name != 'elastic/elasticsearch-specification' | |
run: echo "Validation is not supported from forks"; exit 1 | |
- uses: actions/checkout@v4 | |
with: | |
path: ./elasticsearch-specification | |
- uses: actions/checkout@v4 | |
with: | |
repository: elastic/clients-flight-recorder | |
path: ./clients-flight-recorder | |
token: ${{ secrets.PAT }} | |
ref: main | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
- name: Install deps 1/2 | |
working-directory: ./clients-flight-recorder | |
run: | | |
npm install --prefix scripts/clone-elasticsearch | |
npm install --prefix scripts/upload-recording | |
npm install --prefix scripts/types-validator | |
- name: Install deps 2/2 | |
working-directory: ./elasticsearch-specification | |
run: | | |
npm install --prefix .github/validate-pr | |
make setup | |
- name: Download artifacts | |
working-directory: ./clients-flight-recorder | |
run: | | |
if [[ -n "${GITHUB_BASE_REF+x}" ]]; then | |
branch=$GITHUB_BASE_REF | |
else | |
branch=$GITHUB_REF_NAME | |
fi | |
node scripts/upload-recording/download.js --branch latest | |
node scripts/clone-elasticsearch/index.js --branch $branch | |
env: | |
GCS_CREDENTIALS: ${{ secrets.GCS_CREDENTIALS }} | |
- name: Remove previous comment | |
uses: maheshrayas/action-pr-comment-delete@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
org: elastic | |
repo: elasticsearch-specification | |
user: github-actions[bot] | |
issue: ${{ github.event.number }} | |
- name: Run validation | |
working-directory: ./elasticsearch-specification | |
run: node .github/validate-pr --token ${{ secrets.GITHUB_TOKEN }} |