orchestrator
uses GitHub Actions to run the following CI tests:
- Build (main): build, unit tests, integration tests, docs tests
- Upgrade: test a successful upgrade path
- System: run system tests backed by actual MySQL topology
Running on pull requests, the main CI job validates the following:
- Validate source code is formatted using
gofmt
- Build passes
- Unit tests pass
- Integration tests pass
- Using
SQLite
backend - Using
MySQL
backend
- Using
- Documentation tests pass: ensuring pages and links are not orphaned.
The action completes by producing an artifact: an orchestrator
binary for Linux amd64
. The artifact is kept for a couple months per GitHub Actions policy.
Upgrade runs on pull requests, tests a successful upgrade path from previous version (ie master
) to PR's branch. This mainly tests internal database structure changes. The test:
- Checks out
master
and runorchestrator
, once usingSQLite
, once usingMySQL
- Checks out
HEAD
(PR's branch) and runorchestrator
using pre-existingSQLite
andMySQL
backends. Expect no error.
System tests run as a scheduled job. A system test:
- Sets up a CI environment which includes:
- A replication topology via DBDeployer, with heartbeat injection
- HAProxy
- Consul
- consul-template
- Deploys
orchestrator
as a service,orchestrator-client
- Runs a series of tests where
orchestrator
operates on the topology, e.g. refactors or fails over.