From 271d2a644fc78c68d6836cc632b0f87b07751879 Mon Sep 17 00:00:00 2001 From: Jason Gauci Date: Mon, 6 May 2024 13:04:31 -0400 Subject: [PATCH] Run system test in codecov (#638) * Update codecov.yml * Update codecov.yml --- .github/workflows/codecov.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index f5b1931a8..67dbf9b50 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -19,7 +19,17 @@ jobs: echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get install -y curl zip unzip tar libssl-dev libcurl4-openssl-dev libunwind-dev git cmake ninja-build gdb protobuf-compiler libsodium-dev libgflags-dev libprotobuf-dev libutempter-dev g++ lcov + + echo "Host localhost\n Port 2222\n\n" >> ~/.ssh/config + + sudo /usr/sbin/sshd -p 2222 + + ssh-keygen -t rsa -f ~/.ssh/id_rsa -P "" -N "" + cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys + cat ~/.ssh/id_rsa.pub >> ~/.ssh/known_hosts + ssh -vvvvvvv -o "StrictHostKeyChecking no" -o 'PreferredAuthentications=publickey' localhost "echo foobar" # Fails if we can't ssh into localhost without a password if [[ -z "${ACT}" ]]; then auth_header="$(git config --local --get http.https://github.com/.extraheader)"; fi + git submodule sync --recursive git submodule update --init --force --recursive @@ -42,18 +52,22 @@ jobs: key: | et-vcpkg-${{ hashFiles( 'vcpkg.json' ) }}-${{ hashFiles( '.git/modules/external/vcpkg/HEAD' )}}-linux-codecov - - name: Build with code coverage + - name: Build run: | mkdir build pushd build cmake -DCODE_COVERAGE=ON ../ make -j`nproc` - ./et-test - lcov --capture --directory . --output-file ../coverage.info - lcov --remove ../coverage.info '/usr/*' --output-file coverage.info # filter system-files - lcov --list ../coverage.info # debug info popd + - name: Build Test with code coverage + run: | + ./build/et-test + ./test/system_tests/connect_with_jumphost.sh + lcov --capture --directory . --output-file ./coverage.info + lcov --remove ./coverage.info '/usr/*' --output-file coverage.info # filter system-files + lcov --list ./coverage.info # debug info + - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: