This sample project uses Google Test, arduino-mock, CMake, and Github Actions to run tests on a development system and when pushed to Github.
You can open this up in Arduino and program it like normal.
You can also run the tests locally:
cd test
./test.sh
You will need CMake installed.