open-nomad/ci
James Rasell a6239adf76
cli: remove unused raft tool helper. (#18954) (#18971)
2023-11-02 08:19:04 +00:00
..
README.md ci: use groups of tests in gha (#15018) 2022-10-27 09:02:58 -05:00
ports.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
skip_non_root.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
slow.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
test-core.json cli: remove unused raft tool helper. (#18954) (#18971) 2023-11-02 08:19:04 +00:00

README.md

CI (unit testing)

This README describes how the Core CI Tests Github Actions works, which provides Nomad with continuous integration unit testing.

Steps

  1. When a branch is pushed, GHA triggers .github/workflows/test-core.yaml.

  2. The first job is mods which creates a pre-cache of Go modules.

  • Only useful for the followup jobs on Linux runners
  • Is keyed on hash(go.sum), so a cache is re-used until deps are modified.
  1. The checks, test-api, test-* jobs are started.
  • The checks job runs make check
  • The test job runs groups of tests, see below

3i. The check step also runs make missing

  • Invokes tools/missing to scan ci/test-cores.json && nomad source.
  • Fails the build if any packages in Nomad are not covered.

4a. The test-* jobs are run.

  • Configured as a matrix of "groups"; each group is a set of packages.
  • The GHA invokes test-nomad with $GOTEST_GROUP for each group.
  • The makefile uses tools/missing to translate the group into packages
  • Package groups are configured in ci/test-core.json

4b. The test-api job is run.

  • Because api is a submodule, invokation of test command is special.
  • The GHA invokes test-nomad-module with the name of the submodule.
  1. The compile jobs are run
  • Waits on checks to complete first
  • Runs on each of linux, macos, windows