Well if you have written a library then surely there are some example sketches that use it? Look e.g. into PIO CI to test-compile these sketches. This is also how many other big libraries do it. (ArduinoJSON). Or create new a project which has unit tests in test/
and use pio test
with it, as shown in Unit tests for PIO library or Library testing - pio test.