ethanmoffat / etheos

[Eth]an's [E]ndless [O]nline [S]erver - fork of eoserv project
zlib License
13 stars 8 forks source link

Add continuous integration tests. Split build pipeline into multiple pipelines. #41

Closed ethanmoffat closed 2 years ago

ethanmoffat commented 2 years ago

Build process now consists of three separate pipelines:

  1. Build windows/linux, push docker dev image, tag git sources with build number, and deploy to azure dev environment
  2. Deploy ci-test environment (using dev image), run CI tests using EOBot, tear down ci-test environment
  3. Build docker test image (retag dev image), deploy to azure test environment

Pipeline triggers are in place so that a push to master (e.g. PR gets merged) will automatically trigger subsequent pipelines. For instance, merge PR -> run etheos pipeline -> run ci test pipeline -> run deployment pipeline.

The following code changes were made:

  1. SQLite connections use the same Database object - this prevents "Database is locked" errors when accessing the file from multiple threads.
  2. ThreadPool threads have improved exception handling for debugging purposes.
  3. dbPassFile logging is only done once.

To support ci tests using multiple bots from the same host with rapid connections, the following configs are set for ci-test instances: MaxConnectionsPerPC=0 MaxConnectionsPerIP=0 IPReconnectLimit=1s LoginQueueSize=4 ThreadPoolThreads=4

CI tests as written are highly dependent on these configs being set. There is no good way to dynamically update these configs at test time, so they are stored in the Azure deployment templates as environment variables.