Skip to content

Commit

Permalink
AM-62 Extend Github actions with UT run and publishing report to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ben authored and MaksymT17 committed Apr 1, 2024
1 parent 45a16cf commit 549c489
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/build_minimal_linux.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: C/C++ CI
name: Linux build check

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
issues: write
pull-requests: write
checks: write

jobs:
build:

Expand All @@ -14,10 +19,24 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install packages
run: sudo apt -y install git g++ cmake libsqlite3-dev
run: sudo apt -y install git g++ cmake libsqlite3-dev gcovr
- name: Clone aquamarine repo
run: git clone https://github.com/MaksymT17/aquamarine.git
- name: Build artifacts with Cmake
run: |
cd aquamarine
./build.sh
- name: Run unit test
run: |
cd aquamarine/unit_tests
./prepare_build.sh
cd build &&
make -j8 &&
./aquamarine_ut --gtest_output="xml"
- name: Publish Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
check_name: Unit test results
files: "**/test_detail.xml"
8 changes: 7 additions & 1 deletion .github/workflows/build_minimal_windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: C/C++ CI
name: Windows build check

on:
push:
Expand All @@ -18,3 +18,9 @@ jobs:
run: |
cd aquamarine
./build.sh
- name: Run unit tests
run: |
cd aquamarine/unit_tests
./prepare_build.sh
./make_and_run_tests.sh
2 changes: 1 addition & 1 deletion unit_tests/make_and_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
cd build &&
make -j8 &&
echo "UNIT TESTS SCRIPT: Binaries ready, starting execution..." &&
./aquamarine_ut &&
./aquamarine_ut > am_test_result.txt &&
echo "UNIT TESTS SCRIPT: Execution of tests finished." &&
if [ $(dpkg-query -W -f='${Status}' valgrind 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
Expand Down

0 comments on commit 549c489

Please sign in to comment.