Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add unit tests in ci #201

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

maxday
Copy link

@maxday maxday commented Aug 14, 2024

Description of changes:

  • add latest version of gtest framework via CMakeLists.txt (1.15.2 as of today)
  • add a noop.dummy_test, as a first step for having unit tests in CI
  • update GitHub action workflow file to enable unit tests and run them
  • update .clang-tidy not to complain on external testing dependencies

Testing:

  • GitHub action CI is green when tests are passing
    Screenshot 2024-08-14 at 13 00 59
  • GitHub action CI is red when tests are failing
    Screenshot 2024-08-14 at 13 00 32

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@maxday maxday marked this pull request as draft August 14, 2024 12:18
@maxday maxday marked this pull request as ready for review August 14, 2024 12:49
@marcomagdy
Copy link
Contributor

@maxday why add a new unittest directory?
There is already a test directory with a CMake file and all.

@maxday
Copy link
Author

maxday commented Aug 14, 2024

@maxday why add a new unittest directory? There is already a test directory with a CMake file and all.

It seems to me that existing tests are integration tests (which requires a more complex infra to be able to run them with CodeBuild and the SDK).
This new repo will contain unit tests, with an extremely fast feedback loop. This will help testing the runtime at the function level, without any third party integration.
Does it make sense to you?

@marcomagdy
Copy link
Contributor

Can you think of a way to combine both tests?
That would help us use the same google-test library for both unit and integration tests. We can even use the same CMake file potentially with some flags to turn on/off the integration tests.

It's not ideal to we have two different sets of tests that use different versions of the testing library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants