Skip to content

Commit

Permalink
Run system test in codecov (#638)
Browse files Browse the repository at this point in the history
* Update codecov.yml

* Update codecov.yml
  • Loading branch information
MisterTea committed May 6, 2024
1 parent 66781b0 commit 271d2a6
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 271d2a6

Please sign in to comment.