name: Tests
on:
  push:
    branches:
      - main
  pull_request:
    types: [ opened, synchronize, reopened ]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout repo"
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: "Configure Project"
        uses: threeal/cmake-action@v1.3.0
      - name: "Prepare Project"
        run: cmake -S ./ -B build
      - name: "Build Tests"
        run: cmake --build build --target build-tests
      - name: "Run TactilityCore Tests"
        run: build/Tests/TactilityCore/TactilityCoreTests
      - name: "Run TactilityFreeRtos Tests"
        run: build/Tests/TactilityFreeRtos/TactilityFreeRtosTests
      - name: "Run TactilityHeadless Tests"
        run: build/Tests/Tactility/TactilityTests
      - name: "Run TactilityKernel Tests"
        run: build/Tests/TactilityKernel/TactilityKernelTests
