Skip to content

fix(core): fix test routing CLI/API #757

fix(core): fix test routing CLI/API

fix(core): fix test routing CLI/API #757

Workflow file for this run

name: Run tests
on:
push:
branches:
- 'main'
- 'dev'
- 'dev-*'
paths:
- 'build_scripts/**'
- 'cmake/**'
- 'docker/**'
- 'frontend/**'
- 'include/**'
- 'packages/**'
- 'src/**'
- 'tests/**'
- 'third_party/**'
- 'CMakeLists.txt'
- 'Makefile'
- 'version.mk'
pull_request:
workflow_dispatch:
jobs:
doctest:
name: doctest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
g++ \
pkg-config \
libcurl4-openssl-dev \
libnl-3-dev \
libnl-route-3-dev \
libunwind-dev \
zlib1g-dev
- name: Run doctest
run: make test
integration-deb:
name: integration Debian package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: docker/setup-buildx-action@v4
- name: Restore compiler cache
uses: actions/cache@v5
with:
path: build/ccache
key: ccache-debian-${{ github.sha }}
restore-keys: |
ccache-debian-
- name: Cache Debian image layers
uses: actions/cache@v5
with:
path: /tmp/.buildx-cache-debian-integration
key: buildx-debian-integration-${{ hashFiles('docker/Dockerfile.debian-builder') }}
- name: Build full Debian package
run: |
make deb-packages DEBIAN_VARIANTS=full \
DEBIAN_DOCKER_CACHE_FROM="/tmp/.buildx-cache-debian-integration" \
DEBIAN_DOCKER_CACHE_TO="/tmp/.buildx-cache-debian-integration-new"
- name: Persist Debian image cache
if: always()
run: |
rm -rf /tmp/.buildx-cache-debian-integration
if [ -d /tmp/.buildx-cache-debian-integration-new ]; then
mv /tmp/.buildx-cache-debian-integration-new /tmp/.buildx-cache-debian-integration
fi
- uses: actions/upload-artifact@v6
with:
name: integration-debian-package
path: build/packages/debian/**/*.deb
# Temporarily disabled due to issues with QEMU on GitHub Actions runners
# system-integration:
# name: system integration (${{ matrix.backend }})
# needs: integration-deb
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# backend: [iptables, nftables]
# steps:
# - uses: actions/checkout@v6
# with:
# submodules: recursive
# - uses: actions/download-artifact@v8
# with:
# name: integration-debian-package
# path: build/integration-debian-package
# - name: Install QEMU integration prerequisites
# run: sudo apt-get update && sudo apt-get install -y qemu-system-x86 qemu-utils mtools dosfstools
# - name: Run packaged system integration suite
# run: |
# deb_path="$(find "$GITHUB_WORKSPACE/build/integration-debian-package" \
# -type f -name 'keen-pbr_*_amd64.deb' ! -name '*dbgsym*' \
# -print -quit)"
# if [ -z "$deb_path" ]; then
# echo "No keen-pbr amd64 Debian package found in downloaded artifact" >&2
# find "$GITHUB_WORKSPACE/build/integration-debian-package" -maxdepth 4 -type f -print >&2
# exit 1
# fi
# make integration-tests \
# INTEGRATION_BACKEND=${{ matrix.backend }} \
# INTEGRATION_DEB="$deb_path"