Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit d5adbf4

Browse files
authored
feat(ci): run integration tests (#436)
uses [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) instead of the deprecated [actions-rs/toolchain](https://github.com/actions-rs/toolchain) for rust setup renamed Containerfile.udp_test_server for consistency fixes #432 needs #434 for CI to succeed Signed-off-by: Harald Gutmann <[email protected]>
1 parent 9c1c130 commit d5adbf4

File tree

3 files changed

+46
-29
lines changed

3 files changed

+46
-29
lines changed

.github/workflows/build.yaml

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
rust-build:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: actions-rs/toolchain@v1
@@ -41,46 +41,60 @@ jobs:
4141
run: |
4242
make test
4343
44-
image-build-controlplane:
45-
runs-on: ubuntu-22.04
44+
image-builds-integration-tests:
45+
runs-on: ubuntu-24.04
4646
steps:
4747
- name: Checkout
4848
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # v4.1.7
49-
- uses: dorny/paths-filter@v3
49+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
5050
id: filter
5151
with:
5252
filters: |
53-
controlplane:
53+
sources:
54+
- Cargo.lock
55+
- Cargo.toml
5456
- 'controlplane/**'
55-
containerfile:
56-
- 'build/Containerfile.controlplane'
57-
- name: build container image
58-
if: steps.filter.outputs.controlplane || steps.filter.outputs.containerfile
57+
- 'dataplane/**'
58+
- 'build/Containerfile.*'
59+
- name: Build controlplane Container Image
60+
if: steps.filter.outputs.sources
5961
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
6062
with:
6163
push: false
6264
context: .
6365
file: build/Containerfile.controlplane
6466
tags: localhost/blixt-controlplane:pr-${{ github.event.pull_request.number }}-${{ github.sha }}
65-
66-
image-build-dataplane:
67-
runs-on: ubuntu-22.04
68-
steps:
69-
- name: Checkout
70-
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # v4.1.7
71-
- uses: dorny/paths-filter@v3
72-
id: filter
73-
with:
74-
filters: |
75-
dataplane:
76-
- 'dataplane/**'
77-
containerfile:
78-
- 'build/Containerfile.dataplane'
79-
- name: build container image
80-
if: steps.filter.outputs.dataplane || steps.filter.outputs.containerfile
67+
- name: Build dataplane Container Image
68+
if: steps.filter.outputs.sources
8169
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
8270
with:
8371
push: false
8472
context: .
8573
file: build/Containerfile.dataplane
8674
tags: localhost/blixt-dataplane:pr-${{ github.event.pull_request.number }}-${{ github.sha }}
75+
- name: Build udp-test-server Container Image
76+
if: steps.filter.outputs.sources
77+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
78+
with:
79+
push: false
80+
context: .
81+
file: build/Containerfile.udp-test-server
82+
tags: localhost/blixt-udp-test-server:pr-${{ github.event.pull_request.number }}-${{ github.sha }}
83+
- name: Install kind and kubectl
84+
uses: helm/kind-action@b72c923563e6e80ea66e8e8c810798cc73e97e5e # current main, includes cloud-provider-kind support
85+
if: steps.filter.outputs.sources
86+
with:
87+
install_only: true
88+
cloud_provider: false
89+
kubectl_version: 'v1.33.3'
90+
- name: Install Rust
91+
if: steps.filter.outputs.sources
92+
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # v1
93+
with:
94+
toolchain: stable
95+
- name: Run Integration Tests
96+
if: steps.filter.outputs.sources
97+
run: |
98+
export REGISTRY="localhost"
99+
export TAG="pr-${{ github.event.pull_request.number }}-${{ github.sha }}"
100+
make test.integration

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ TAG ?= integration-tests
8686
# Containerfile paths for each service
8787
CONTROLPLANE_CONTAINERFILE ?= build/Containerfile.controlplane
8888
DATAPLANE_CONTAINERFILE ?= build/Containerfile.dataplane
89-
UDP_SERVER_CONTAINERFILE ?= build/Containerfile.udp_test_server
89+
UDP_SERVER_CONTAINERFILE ?= build/Containerfile.udp-test-server
9090

9191
.PHONY: build.image.controlplane
9292
build.image.controlplane:
9393
$(CONTAINER_RUNTIME) build $(BUILD_ARGS) --file=$(CONTROLPLANE_CONTAINERFILE) -t $(BLIXT_CONTROLPLANE_IMAGE):$(TAG) ./
9494

95-
.PHONY: build.image.udp_test_server
96-
build.image.udp_test_server:
95+
.PHONY: build.image.udp-test-server
96+
build.image.udp-test-server:
9797
$(CONTAINER_RUNTIME) build $(BUILD_ARGS) --file=$(UDP_SERVER_CONTAINERFILE) -t $(BLIXT_UDP_SERVER_IMAGE):$(TAG) ./
9898

9999
.PHONY: build.image.dataplane
@@ -104,7 +104,7 @@ build.image.dataplane:
104104
build.all.images:
105105
$(MAKE) build.image.controlplane
106106
$(MAKE) build.image.dataplane
107-
$(MAKE) build.image.udp_test_server
107+
$(MAKE) build.image.udp-test-server
108108

109109
# ------------------------------------------------------------------------------
110110
# Development
@@ -130,6 +130,9 @@ lint:
130130
test:
131131
cargo test -vv --workspace --exclude tests-integration
132132

133+
test.integration:
134+
cargo test --package tests-integration
135+
133136
.PHONY: test.gencert
134137
test.gencert: cfssl cfssljson
135138
$(CFSSL) gencert \
File renamed without changes.

0 commit comments

Comments
 (0)