라이선스 추가 및 docker 파일 추가 #123
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: test | |
on: | |
pull_request: | |
jobs: | |
test-coverage: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out this repository | |
uses: actions/[email protected] | |
- name: Build and test this project | |
run: | | |
mkdir build && cd build | |
cmake .. -DCMAKE_BUILD_TYPE=PROFILE $SRC_DIR | |
make VERBOSE=1 | |
./tree_test | |
- name: Save test result to text file | |
if: always() | |
run: | | |
cd build | |
./tree_test | tee test_output.txt | |
- name: Analyze the result of GoogleTest with gcov | |
run: | | |
gcov build/CMakeFiles/tree_test.dir/source/avl_tree.cc.gcno | |
gcov build/CMakeFiles/tree_test.dir/source/bst_tree.cc.gcno | |
gcov build/CMakeFiles/tree_test.dir/source/set.cc.gcno | |
gcov build/CMakeFiles/tree_test.dir/source/main.cc.gcno | |
- name: Install lcov and generate html file with lcov | |
run: | | |
sudo apt-get install lcov | |
lcov --directory build/CMakeFiles/tree_test.dir/source --capture --output-file app.info | |
lcov --remove app.info '*/usr/include/*' '*googletest*' 'Mock*' 'UT*' '*aivc-macchina/platform/*' --output-file final.info --ignore-errors empty | |
genhtml -o cov_html final.info | |
- name: zip files | |
run: | | |
ls | |
tar czvf cov_html.tar.gz cov_html | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report | |
path: cov_html.tar.gz | |
- name: PR comment with file | |
if: always() | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: build/test_output.txt | |