Skip to content

Commit 4dbea33

Browse files
leodidoona-agent
andcommitted
feat(ci): add integration tests workflow
Add GitHub Actions workflow to run integration tests automatically on PRs. Features: - Runs on every PR targeting main - Validates OCI layout implementation - Verifies deterministic builds (3 runs) - Uses Docker Buildx + skopeo Tests covered: - TestDockerPackage_ExportToCache_Integration - TestDockerPackage_CacheRoundTrip_Integration - TestDockerPackage_OCILayout_Determinism_Integration The workflow: 1. Sets up Go, Docker Buildx, and skopeo 2. Runs all integration tests 3. Verifies byte-for-byte reproducible builds 4. Takes ~10 minutes total This ensures OCI layout changes are continuously validated and determinism is maintained across all future changes. Co-authored-by: Ona <no-reply@ona.com>
1 parent 809bc88 commit 4dbea33

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Integration Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'main'
7+
paths:
8+
- 'pkg/leeway/**'
9+
- 'go.mod'
10+
- 'go.sum'
11+
- '.github/workflows/integration-tests.yaml'
12+
push:
13+
branches:
14+
- 'main'
15+
16+
env:
17+
GO_VERSION: '1.24'
18+
19+
jobs:
20+
integration-tests:
21+
name: Run integration tests
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Golang
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version: ${{ env.GO_VERSION }}
31+
cache: true
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
with:
36+
driver: docker-container
37+
38+
- name: Install skopeo for OCI layout support
39+
run: |
40+
sudo apt-get update -qq
41+
sudo apt-get install -y -qq skopeo
42+
43+
- name: Verify skopeo installation
44+
run: skopeo --version
45+
46+
- name: Run integration tests
47+
run: |
48+
go test -tags=integration -v ./pkg/leeway \
49+
-run ".*Integration" \
50+
-timeout 10m
51+
52+
- name: Verify determinism (run 3 times)
53+
run: |
54+
echo "=== Verifying deterministic builds ==="
55+
for i in 1 2 3; do
56+
echo "Run $i:"
57+
go test -tags=integration ./pkg/leeway \
58+
-run TestDockerPackage_OCILayout_Determinism_Integration \
59+
-timeout 5m 2>&1 | grep "Deterministic builds verified" || true
60+
done

0 commit comments

Comments
 (0)