Skip to content

fix: Added support for another metric format #5754

fix: Added support for another metric format

fix: Added support for another metric format #5754

name: validate entity synthesis definitions
on:
pull_request_target:
branches:
- main
permissions:
pull-requests: write
jobs:
validate:
name: Validation
runs-on: ubuntu-latest
env:
RELATIONSHIPS_SYNTHESIS_DIR: ../prcode/relationships/synthesis/
DEFINITIONS_DIR: ../prcode/entity-types/
steps:
- name: Checkout code from base branch
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Checkout PR code (merged version with base branch)
uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
path: "prcode"
persist-credentials: false
if: ${{ github.event.pull_request.mergeable == true }}
- name: Checkout PR code (latest PR commit if merged version is not available)
uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.head.sha }}"
path: "prcode"
persist-credentials: false
if: ${{ github.event.pull_request.mergeable != true }} # If the PR is not mergeable, or it's mergeability it's yet not calculated
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: npm --prefix validator install
- name: Validate definition
run: npm --prefix validator run check-pr
env:
PR_NUMBER: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Ensure sanitize was run
# Runs the sanitize script and checks errors if the dashboards were not sanitized.
# If the dashboards were sanitized, the git command will return 0 and the step will pass.
run: npm --prefix validator run sanitize-dashboards && git -C prcode diff-index --quiet HEAD -- entity-types/