![Coverage Status](https://camo.githubusercontent.com/058db6578a27b9db43e76adbb224221e9bd9c4c0dd9109e4e79d677e19ebbcc6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f415445435a45522f6c616230352f62616467652e7376673f6272616e63683d6d61696e)
Основываясь на лабораторной работе номер 5
git clone https://github.com/ATECZER/lab04.git
git remote remove origin
git remote add origin [email protected]:ATECZER/lab05.git
cmake_minimum_required(VERSION 3.4)
SET(COVERAGE OFF CACHE BOOL "Coverage")
SET(CMAKE_CXX_COMPILER "/usr/bin/g++")
project(tests)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/third-party/gtest" "gtest")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/banking)
add_executable(tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.cpp)
if (COVERAGE)
target_compile_options(tests PRIVATE --coverage)
target_link_libraries(tests PRIVATE --coverage)
endif()
target_include_directories(tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/banking)
target_link_libraries(tests PRIVATE gtest gtest_main gmock_main banking)
name: CMake
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: submodules
run : |
git submodule update --init --recursive
sudo apt install lcov
- name: Build
run: cmake -H. -B _build -DCOVERAGE=1 && cmake --build _build
- name: Test
working-directory: ${{github.workspace}}/_build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
./tests
lcov -c -t "symmetrictree" -o lcov.info -d .
lcov --remove lcov.info '/home/runner/work/lab05/lab05/third-party/gtest/*' -o lcov.info
lcov --remove lcov.info '/usr/include/*' -o lcov.info
- name: CovBeg
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: ./_build/lcov.info
coveralls-endpoint: https://coveralls.io