name: CI Checks
on:
  push:
    branches: ["**"]
  pull_request:
    branches: [main]
  workflow_dispatch:
jobs:
  formatting:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v4.1.1
      - name: Check Formatting of FreeRTOS-Kernel Files
        uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
        with:
          exclude-dirs: portable

  spell-check:
      runs-on: ubuntu-latest
      steps:
        - name: Clone This Repo
          uses: actions/checkout@v4.1.1
        - name: Run spellings check
          uses: FreeRTOS/CI-CD-Github-Actions/spellings@main
          with:
            path: ./
            exclude-files: History.txt

  link-verifier:
    runs-on: ubuntu-latest
    steps:
      - name: Clone This Repo
        uses: actions/checkout@v4.1.1
      - name: Link Verification
        uses: FreeRTOS/CI-CD-Github-Actions/link-verifier@main

  verify-manifest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4.1.1
        with:
          submodules: true
          fetch-depth: 0

      - name: Run manifest verifier
        uses: FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@main
        with:
          path: ./
          fail-on-incorrect-version: true
