Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: ASSI/AMI Tests

on:
push:
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ libgtest-dev

- name: Configure CMake
run: cmake -S . -B build

- name: Build project
run: cmake --build build

- name: Run tests
run: ctest --test-dir build --output-on-failure --no-tests=error
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.20)
project(FTInterface LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(assi_tests tests/assi_ami/test_assi_logic.cpp)
add_executable(assi_tests
tests/assi_ami/test_assi_logic.cpp
ino/assi_controller/assi_controller.cpp
)
target_include_directories(assi_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ino/assi_controller)

find_package(GTest REQUIRED)
target_link_libraries(assi_tests PRIVATE GTest::gtest_main)

enable_testing()
include(GoogleTest)
gtest_discover_tests(assi_tests)
6 changes: 6 additions & 0 deletions ino/assi_controller/assi_controller.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "assi_controller.hpp"

void assi_light_toggle(ASState, ASSIOutput& output)
{

}
2 changes: 1 addition & 1 deletion tests/assi_ami/test_assi_logic.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <gtest/gtest.h>

#include "assi_types.hpp"
#include "assi_contoller.hpp"
#include "assi_controller.hpp"

TEST(ASSITest, OffShowsNone) // Parameters - Test group, Test name
{
Expand Down
Loading