Testing and CI
Overview
SST is tested with GitHub Actions in two repositories:
- iotauth/iotauth builds Auth and runs end-to-end tests of the C, C++, Node.js, and Python entities, with a single Auth and with two Auths.
- iotauth/sst-c-api, checked out as the
entity/csubmodule of iotauth, runs the C and C++ API unit tests and runs the C and C++ examples against Auth.
The two repositories call each other's workflows, so a change on either side is tested against the other. See Cross-repository testing.
Unless noted otherwise, each workflow runs on every push to main and on every pull request targeting main. The workflow files and their descriptions are in .github/workflows/ of iotauth (with a README) and .github/workflows/ of sst-c-api.
iotauth workflows
| Workflow | File | What it runs |
|---|---|---|
| Auth Server Build | maven.yml | Builds Auth with Maven on JDK 17 (mvn -B package --file auth/pom.xml). |
| Example Tests | example.yml | Runs examples/generateAll.sh to generate the credentials, configuration files, and databases of the example Auths and entities. |
| Entity Integration Tests | integration-test.yml | Python unit tests, the C/Node.js/Python matrix, six mixed C++ pairings against Auth101, and a Python permanent distribution-key case. See Entity integration tests. |
| Multi-Auth Integration Tests | multi-auth-test.yml | A Node.js, C, C++, or Python client registered with Auth101 talks to a server of the same implementation registered with Auth102. Can also be started manually. See Multi-Auth integration tests. |
| sst-c-api Tests | sst-c-api-tests.yml | Calls the ci.yml workflow of sst-c-api with this iotauth commit. See sst-c-api workflows. |
| sst-c-api C++ Tests | sst-c-api-cpp-tests.yml | Calls the ci-cpp.yml workflow of sst-c-api with this iotauth commit. |
| Python Formatting | python-formatting.yml | Ruff lint and format checks for entity/python, on pull requests that change files under entity/python/. |
| CodeQL | codeql-analysis.yml | CodeQL static analysis for Java, JavaScript, and Python. Also runs weekly. |
Entity integration tests
integration-test.yml defines three jobs:
python-unit-testsinstalls the Python package inentity/pythonand runs its unit tests with Python 3.12.integration-testrunsexamples/scripts/run_integration_test.shten times: the nine--client/--servercombinations ofc,node, andpython, and the Python client with--permanent-distribution-key.cpp-interopruns the six ordered pairs between C++ and the other three implementations. Each pair gets a fresh runner and its own Auth101. One failed pair leaves the others running. The C++-client/C++-server case runs in the separate C++ workflow. Together the workflows exercise all 16 ordered language pairs with one Auth.
Each run builds (or reuses) Auth and the entities, generates (or reuses) the example credentials, starts Auth101, starts the server, runs the client, and checks the logs for the expected messages.
In the integration-test job, the first run (C client, C server) does the full build and credential setup. If it succeeds, the later runs reuse those artifacts with --no-build --no-setup; if it fails, each later run does its own build and setup so the runs stay independent. Every run has continue-on-error, so all ten execute, and a final step fails the job if any run failed.
Multi-Auth integration tests
multi-auth-test.yml runs examples/scripts/run_multi_auth_test.sh once for each of --entity node, c, cpp, and python. Each run:
- Starts Auth101 and Auth102 with the two-Auth topology of
examples/configs/default.graph, in which the two Auths trust each other. - Starts a
net2.serverentity registered with Auth102 and connects anet1.cliententity registered with Auth101 to it. - Checks the entity logs for the expected message exchange.
- Checks the Auth logs. The client's session key was issued by Auth101, so Auth102 must fetch it over the trusted-Auth channel: Auth102 logs
Sending auth session key req to Auth 101, and Auth101 logsReceived AuthSessionKeyReqMessage.
--entity | Client and server |
|---|---|
node | client.js and server.js in entity/node/example_entities, driven through their command prompts, with messages in both directions. |
c | entity_client and entity_server in entity/c/examples/server_client_example. The client connects twice, with two session keys. The C example server always listens on port 21100. |
cpp | entity_client and entity_server in entity/c/cpp/examples/server_client_example. The client connects twice, with two session keys. The server listens on 22100, the port of net2.server. |
python | py_client.py and py_server.py in entity/python/examples. The client sends three messages and receives a reply to each. |
For c, cpp, and python, the runner writes configs derived from the C example configs, with Auth102 and net2.server credentials for the server. As in the entity integration tests, the first run does the full setup, later runs reuse it when it succeeded, and a final step fails the job if any run failed.
sst-c-api workflows
| Workflow | File | Jobs |
|---|---|---|
| Unit & Integration tests | ci.yml | C API unit tests, C examples against Auth, and the iotauth entity integration tests. |
| C++ Unit & Integration tests | ci-cpp.yml | C++ API unit tests and C++ examples against Auth. |
| clang-format-review | clang-format.yml | make format-check (clang-format --dry-run --Werror) on pull requests. |
ci.yml
- Unit Test configures the C API with CMake, builds it, and runs
ctest. - Integration-test checks out iotauth, builds Auth with Maven on JDK 17, generates the example credentials, and starts Auth101. It then runs, from
entity/c/:examples/file_block_encrypt_example:block_writer,block_reader, andblock_reader_load_s_key_list.examples/server_client_example:entity_serverandentity_client, thenthreaded_get_target_id_clientandthreaded_get_target_id_server.tests:save_load_session_key_list_with_password_testandmulti_thread_get_session_key_test.- IPFS file sharing: installs IPFS (Kubo), regenerates credentials with
configs/file_sharing.graph, and runs the C uploader and downloader and the C++uploaderanddownloaderinexamples/ipfs_examples/with the File System Manager, then the C secure uploader and downloader with the Secure File System Manager.
- iotauth-integration-test calls
integration-test.ymlof iotauth with this sst-c-api commit. It is skipped when iotauth itself callsci.yml.
ci-cpp.yml
- C++ Unit Test configures
cpp/with CMake, builds the library and its tests, and runs the six CTest executables, including the offline IPFS helper test. See Build and test the library for what each covers. - C++ Integration-test builds Auth, generates credentials, and starts Auth101. It then runs, from
entity/c/cpp/examples/:file_block_encrypt_example:block_writerandblock_readeron a generated input file;block_readercompares the decrypted output with the original.server_client_example:entity_serverandentity_client, thenthreaded_get_target_id_clientandthreaded_get_target_id_server, from the example directory with the C example configs.ipfs_examples:entity_uploaderandentity_downloaderwith the File System Manager, thensecure_entity_uploaderandsecure_entity_downloaderwith the Secure File System Manager.
Cross-repository testing
The C and C++ APIs live in sst-c-api, but their integration tests need Auth and the example configuration from iotauth. Each repository therefore runs its tests against the other:
| Triggered in | Calls | With | Effect |
|---|---|---|---|
| iotauth | ci.yml and ci-cpp.yml of sst-c-api | iotauth-ref set to the iotauth commit under test | The unit tests run on the main branch of sst-c-api. The integration jobs check out this iotauth commit with its submodule, so the C and C++ examples of the pinned sst-c-api commit run against this version of Auth and of the example configuration. |
| sst-c-api | integration-test.yml of iotauth | sst-c-api-ref set to the sst-c-api commit under test | The entity integration tests run on the main branch of iotauth, with this commit of the C API checked out into entity/c instead of the submodule pin. |
When sst-c-api runs its own integration jobs, without an iotauth-ref input, it checks out the iotauth branch named in its iotauth-ref.txt (main by default) and replaces that checkout's entity/c with the sst-c-api commit under test. To test an sst-c-api change that depends on an unmerged iotauth change, set iotauth-ref.txt to that iotauth branch.
The multi-Auth tests always use the sst-c-api commit pinned by the iotauth submodule.
Recorded integration runs
SST v2.1.0
The three GitHub Actions runs below passed on November 19, 2026, on the commit tagged for the SST v2.1.0 release. A C++ client connecting to a Python server and a Python client connecting to a C++ server count as two combinations because they exercise different roles in each API.
| Run | Coverage on the release commit |
|---|---|
| Entity integration | With both programs registered with Auth101, all nine client/server combinations of C, JavaScript (Node.js), and Python passed. Six more tests passed with C++ as the client or server and each of the other three programming languages in the opposite role. A further Python-to-Python test passed using a permanent distribution key. |
| C++ integration | The C++ client and C++ server exchanged messages using Auth101. Together with the entity integration run, this covers all 16 combinations of client and server programming languages. |
| Integration across two Auth instances | Four tests passed, one per programming language. In each case the client registered with Auth101, the server registered with Auth102, and the runner verified that Auth102 retrieved the session key from Auth101. |
Earlier evaluation
On November 13, 2026, the push of iotauth revision 715e620f pinned C/C++ API revision cf95b850. The following run records show exactly which checks succeeded at that revision.
| Run | Observed result |
|---|---|
| Single-Auth entity integration | All nine ordered pairs of C, Node.js, and Python passed, along with a Python-to-Python run using a permanent distribution key for the client. |
| Two-Auth integration | The Node.js, C, C++, and Python same-language pairs all passed. Each run checked peer messages, Auth102's lookup and response, and Auth101's receipt of the request. |
| C/C++ API repository’s C++ workflow | The C++ workflow passed its C++ unit tests and its examples, including the C++ client connecting to the C++ server through Auth101. |
The later six mixed C++ cases were also exercised locally against Auth101 with the extended integration runner. The November 13 records above identify the coverage of that historical revision.
The two-Auth runner keeps the client language and server language the same. A mixed-language pair across two Auths needs its own test.
Running the tests locally
The end-to-end runners live in examples/scripts/ of iotauth and are documented in its README. From the iotauth repository root:
cd examples/scripts
./run_integration_test.sh --client cpp --server python
./run_integration_test.sh --client python --server cpp
./run_multi_auth_test.sh --entity cpp
Both runners build Auth and generate the example credentials by default; pass --no-build --no-setup to reuse existing artifacts. The setup regenerates the example credentials with the runner's password (1234 unless --password is given). Other useful options include --keep-logs, --stop-existing to stop processes still holding the test ports, and, for run_integration_test.sh, --tmux to watch Auth, the server, and the client in tmux panes.
For the C++ unit tests, see Build and test the library. The C++ example commands that CI runs are listed in the C++ Guide and the server/client example.
Adding a CI test
- Put end-to-end test logic in a script under
examples/scripts/that sourcescommon.shfor the shared helpers (building, credential setup, starting and waiting for services, and log assertions), so the test runs the same way locally and in CI. - Add a workflow under
.github/workflows/that runs the script, followingintegration-test.ymlandmulti-auth-test.yml: the first run does the build and setup, later runs reuse them, every run usescontinue-on-error, and a final step fails the job if any run failed. - Add the workflow to the table in
.github/workflows/README.mdand on this page.