Skip to content

CI: add GitHub Actions workflow for unit tests #478

Description

@robot-primus

Summary

Replace the unit test step currently executed by Prow (make docker-test in automation/check-patch.e2e.sh) with a GitHub Actions workflow.

This should be an extension of the existing "Quality check" workflow. Depending on success of build and lint.

Current state

Unit tests are run inside a Fedora-based container (hack/test-dockerized.sh) that provides Open vSwitch and CNI plugin dependencies. The container runs make test, which executes:

go test -p 1 -mod=readonly ./cmd/... ./pkg/... -v --ginkgo.v

Tests are serialized (-p 1) because multiple packages interact with a shared OVS instance. The test environment requires a running ovsdb-server and ovs-vswitchd, and the host-local CNI plugin binary.

Expected outcome

A GitHub Actions workflow that:

  • Triggers on pull requests and pushes to the main branch.
  • Runs make test (or the equivalent dockerized variant make docker-test) and reports pass/fail as a status check.
  • Provides an environment with Open vSwitch services available, as the tests operate against a real OVS database.
  • Uses the Go version defined by the project.

Acceptance criteria

  • A dedicated GitHub Actions workflow file exists for unit tests.
  • All unit tests in ./cmd/... and ./pkg/... pass on the main branch.
  • PR authors see clear pass/fail status checks for this workflow.
  • Test output (including Ginkgo verbose output) is available in the workflow logs.
  • The workflow does not depend on any external (non-GitHub) CI infrastructure.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions