Skip to content

feat(rkl): Add the container probe functionality. #127

feat(rkl): Add the container probe functionality.

feat(rkl): Add the container probe functionality. #127

name: RKL Test
on:
pull_request:
paths:
- 'project/libbridge/**'
- 'project/libipam/**'
- 'project/rkl/**'
jobs:
test:
name: Test
runs-on: [self-hosted]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup test environment
run: |
buck2 build //project/libbridge:libbridge
buck2 build //project/libipam:libipam
buck2 build //project/libnetwork:libnetwork
sudo mkdir -p /opt/cni/bin
sudo mkdir -p /etc/cni/net.d
sudo cp $(buck2 build //project/libbridge:libbridge --show-output | cut -d' ' -f2) /opt/cni/bin/libbridge
sudo cp $(buck2 build //project/libipam:libipam --show-output | cut -d' ' -f2) /opt/cni/bin/libipam
sudo cp $(buck2 build //project/libnetwork:libnetwork --show-output | cut -d' ' -f2) /opt/cni/bin/libnetwork
- name: Run tests
run: |
cd project
cargo test --no-run -p rkl
# to avoid exit code equals 0
FAIL=0
sudo sh -c '
for t in $(find target/debug/deps/ -type f -executable -name "test_*"); do
$t || FAIL=1
done
exit $FAIL
'
- name: clean up
run: |
sudo rm -rf /etc/cni/net.d
sudo rm -rf /run/youki