name: Deno

on:
  pull_request:
    types:
      - opened
      - synchronize

jobs:
  check_deno:
    name: Ensure Deno types are in sync with the code
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Project
        uses: actions/checkout@v2

      - name: Use Node.js v16
        uses: actions/setup-node@v2
        with:
          node-version: 16

      - name: Install Dependencies
        run: npm ci

      - name: Run Check Script
        run: node ./scripts/actions/report-deno-not-ran.mjs
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
