Cache API validation results #2
Workflow file for this run
This file contains hidden or 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: Cache API validation report | |
| on: | |
| pull_request | |
| # push: | |
| # branches: | |
| # - main | |
| # - '[0-9]+.[0-9]+' | |
| jobs: | |
| generate-report: | |
| name: generate-report | |
| runs-on: ubuntu-latest | |
| steps: | |
| - 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 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install deps 1/2 | |
| working-directory: ./clients-flight-recorder | |
| run: | | |
| npm install --prefix scripts/types-validator | |
| - name: Install deps 2/2 | |
| working-directory: ./elasticsearch-specification | |
| run: | | |
| make setup | |
| - name: Generate specification and check generated types | |
| working-directory: ./elasticsearch-specification | |
| run: | | |
| make contrib | |
| - name: Generate report | |
| working-directory: ./clients-flight-recorder/scripts/types-validator | |
| env: | |
| BRANCH: ${{ github.ref_name }} | |
| run: node index.js --generate-report --ci --branch $BRANCH | |
| - name: Cache JSON report | |
| id: cache-json-report | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ./clients-flight-recorder/recordings/types-validation/types-validation.json | |
| key: ${{ steps.restore-json-report.outputs.cache-primary-key }} |