Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 2.09 KB

Understanding CI.md

File metadata and controls

36 lines (28 loc) · 2.09 KB

Understanding CI

orchestrator 使用 GitHub Actions 来运行以下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

Build

Running on pull requests, the main CI job validates the following:

  • 验证源代码是否使用gofmt格式化
  • Build passes
  • Unit tests pass
  • Integration tests pass
  • Using SQLite backend
  • Using MySQL backend 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

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 run orchestrator, once using SQLite, once using MySQL
  • Checks out HEAD (PR's branch) and run orchestrator using pre-existing SQLite and MySQL backends. Expect no error.

System

System tests run as a scheduled job. A system test:

  • Sets up a CI environment which includes:
  • Deploys orchestrator as a service, orchestrator-client
  • Runs a series of tests where orchestrator operates on the topology, e.g. refactors or fails over.