RDK-55755: [RDK-E] Optimize Telemetry 2.0 Client Library #113
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: L2 Integration Tests | |
on: | |
pull_request: | |
branches: [ develop ] | |
env: | |
AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }} | |
AUTOMATICS_PASSCODE: ${{ secrets.AUTOMATICS_PASSCODE }} | |
jobs: | |
execute-L2-tests-on-pr: | |
name: Execute L2 test suite in L2 container environment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Checkout telemetry code | |
uses: actions/checkout@v4 | |
with: | |
path : 'telemetry' | |
- name: Checkout rdk_logger | |
uses: actions/checkout@v4 | |
with: | |
repository: 'rdkcentral/rdk_logger' | |
token: ${{ secrets.GH_ACTION_PULL }} | |
path : 'telemetry/containers/native-platform/rdk_logger' | |
- name: Checkout WebconfigFramework | |
uses: actions/checkout@v4 | |
with: | |
repository: 'rdkcentral/WebconfigFramework' | |
token: ${{ secrets.GH_ACTION_PULL }} | |
path : 'telemetry/containers/native-platform/WebconfigFramework' | |
- name: Build Docker image for Mock XCONF Server | |
uses: docker/build-push-action@v4 | |
with: | |
context: telemetry/containers/mock-xconf | |
push: false | |
tags: mock-xconf:latest | |
load: true | |
# - name: List Docker Images | |
# run: docker images | |
# commenting this as this was used in debugging to see if container loads with load: true | |
- name: Dump self-signed public serts from mock-xconf container | |
run: | | |
docker run --rm mock-xconf:latest cat /etc/xconf/certs/mock-xconf-server-cert.pem > telemetry/containers/native-platform/mock-xconf-server-cert.pem | |
- name: Build Docker image for native platform Server | |
uses: docker/build-push-action@v4 | |
with: | |
context: telemetry/containers/native-platform | |
push: false | |
tags: native-platform:latest | |
load: true | |
- name: Install Docker Compose | |
run: | | |
sudo apt-get update | |
sudo apt-get install docker-compose -y | |
- name: Run L2 container with code attached to /mnt/L2_CONTAINER_SHARED_VOLUME | |
run: | | |
cd telemetry/containers | |
docker-compose up -d | |
- name: Run L2 tests in the native-platform container | |
run: | | |
docker exec -i native-platform /bin/bash -c "cd /mnt/L2_CONTAINER_SHARED_VOLUME/ && sh build_inside_container.sh && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu:/usr/local/lib: && sh test/run_l2.sh" | |
- name: Copy l2 test results to runner | |
run: | | |
docker cp native-platform:/tmp/l2_test_report /tmp/L2_TEST_RESULTS | |
- name: Shut down L2 container | |
run: | | |
cd telemetry/containers | |
docker-compose down | |
upload-test-results: | |
name: Upload L2 test results to automatic test result management system | |
needs: execute-L2-tests-on-pr | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/rdkcentral/docker-rdk-ci:latest | |
volumes: | |
- /tmp/L2_TEST_RESULTS:/tmp/L2_TEST_RESULTS | |
steps: | |
- name: Upload results | |
if: github.repository_owner == 'rdkcentral' | |
run: | | |
echo "Contents in workspace directory" | |
ls -l | |
echo "===============================" | |
echo "Contents in /tmp/L2_TEST_RESULTS" | |
ls -l /tmp/L2_TEST_RESULTS | |
echo "===============================" | |
git config --global --add safe.directory `pwd` | |
gtest-json-result-push.py /tmp/L2_TEST_RESULTS https://rdkeorchestrationservice.apps.cloud.comcast.net/rdke_orchestration_api/push_unit_test_results `pwd` | |