name: Validate Data

on:
  push:
  pull_request:

jobs:
  validate-data:
    permissions:
      contents: read
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - uses: actions/setup-node@v3
        with:
          node-version: '16'
          cache: 'npm'
          cache-dependency-path: script/validate-data/package-lock.json

      - name: Validate workflows
        run: |
          npm ci
          npx ts-node-script ./index.ts
        working-directory: ./script/validate-data
