Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,28 @@ jobs:
echo "=== Test logs ==="
find . -name "test.log" -exec echo "--- {} ---" \; -exec cat {} \; || echo "No test logs found"

integration:
name: Integration Tests
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
fetch-depth: 0

- name: Run integration tests
run: make test-integration

- name: Display test logs on failure
if: failure()
run: |
echo "=== Integration test logs ==="
find . -name "test.log" -exec echo "--- {} ---" \; -exec cat {} \; || echo "No test logs found"

dependencies:
name: Dependencies
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
Expand Down
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build test proto gazelle clean clean-proto run-server run-client-get-graph run-client-changed-targets help
.PHONY: build test test-integration proto gazelle clean clean-proto run-server run-client-get-graph run-client-changed-targets help

# Bazel wrapper
BAZEL = ./tools/bazel
Expand All @@ -15,6 +15,12 @@ test:
@$(BAZEL) test //...
@echo "All tests passed!"

# Run integration tests (requires bazel; may take several minutes)
test-integration:
@echo "Running integration tests..."
@$(BAZEL) test //integration:integration_test --test_output=errors --test_env=TANGO_REPO_REMOTE=$$(git rev-parse --show-toplevel)
@echo "Integration tests passed!"

# Generate protobuf files using protoc
proto:
@echo "Generating protobuf files with protoc..."
Expand Down Expand Up @@ -81,10 +87,11 @@ help:
@echo "Available targets:"
@echo ""
@echo "Build & Test:"
@echo " make build - Build all targets"
@echo " make test - Run all tests"
@echo " make gazelle - Update BUILD.bazel files"
@echo " make clean - Clean generated files and binaries"
@echo " make build - Build all targets"
@echo " make test - Run all tests"
@echo " make test-integration - Run integration tests (slow)"
@echo " make gazelle - Update BUILD.bazel files"
@echo " make clean - Clean generated files and binaries"
@echo ""
@echo "Protobuf:"
@echo " make proto - Generate protobuf files (gogoslick, grpc, yarpc)"
Expand Down Expand Up @@ -117,4 +124,4 @@ help:
@echo " # Run get-changed-targets via the Tango client"
@echo " make run-client-changed-targets REMOTE=org/repo BASE_SHA=abc123 NEW_BASE_SHA=abc123~"
@echo " # Opt into per-target fields (default false per proto3)"
@echo " make run-client-changed-targets REMOTE=org/repo BASE_SHA=abc123 NEW_BASE_SHA=abc123~ INCLUDE_TAGS=true INCLUDE_HASHES=true INCLUDE_ATTRIBUTES=true"
@echo " make run-client-changed-targets REMOTE=org/repo BASE_SHA=abc123 NEW_BASE_SHA=abc123~ INCLUDE_TAGS=true INCLUDE_HASHES=true INCLUDE_ATTRIBUTES=true"
26 changes: 26 additions & 0 deletions integration/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
load("@rules_go//go:def.bzl", "go_test")

go_test(
name = "integration_test",
size = "large",
timeout = "long",
srcs = ["integration_test.go"],
tags = [
"integration",
"manual",
],
deps = [
"//controller",
"//core/git",
"//core/repomanager",
"//core/storage",
"//orchestrator",
"//tangopb",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@org_uber_go_yarpc//:yarpc",
"@org_uber_go_yarpc//api/transport",
"@org_uber_go_yarpc//transport/grpc",
"@org_uber_go_zap//zaptest",
],
)
Loading