Skip to content
Closed
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
25 changes: 25 additions & 0 deletions .github/workflows/unreal-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Unreal GSDK Tests

on:
pull_request:
paths:
- 'UnrealPlugin/**'
- '.github/workflows/unreal-tests.yml'

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Configure CMake
run: cmake -S UnrealPlugin/Tests -B UnrealPlugin/Tests/build

- name: Build
run: cmake --build UnrealPlugin/Tests/build

- name: Test
run: ctest --test-dir UnrealPlugin/Tests/build --output-on-failure
10 changes: 10 additions & 0 deletions UnrealPlugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ This plugin offers both a Blueprint API and a C++ API. The Blueprint API still r

The sample game these instructions were created with was called ThirdPersonMP, so replace anywhere you see that with your game name.

## Plugin files

When integrating the GSDK plugin into your Unreal project, you only need to copy the following into your project's `Plugins/PlayFabGSDK` folder:

* `Source/` — Plugin source code
* `Resources/` — Plugin resources
* `PlayFabGSDK.uplugin` — Plugin descriptor

> **Note:** The `Tests/`, `TestingProject/`, and `Documentation/` directories, along with the markdown and license files in this folder, are used for GSDK development and CI only. They are **not needed** when using the plugin in your game project and should not be copied.

## Requirements

* Download Visual Studio. The [community version](https://visualstudio.microsoft.com/vs/community/) is free.
Expand Down
39 changes: 39 additions & 0 deletions UnrealPlugin/Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.14)
project(UnrealGSDKTests LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(FetchContent)

FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0
)

FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.3
)

# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

FetchContent_MakeAvailable(googletest json)

enable_testing()

add_executable(unreal_gsdk_tests
GSDKConfigTests.cpp
GSDKHeartbeatTests.cpp
)

target_link_libraries(unreal_gsdk_tests
GTest::gtest_main
nlohmann_json::nlohmann_json
)

include(GoogleTest)
gtest_discover_tests(unreal_gsdk_tests)
Loading
Loading