Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AD-612] Publish/posting TestResults #34

Merged
merged 21 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ac3c539
[AD-612] uncomment code for posting test results
alinaliBQ Feb 28, 2022
47aff03
[AD-612] change to always upload test results
alinaliBQ Mar 1, 2022
7d50d2f
Merge branch 'develop' into alinaliBQ/AD-612/post_test_result
alinaliBQ Mar 1, 2022
1c78e0f
[AD-612] implement boost log
alinaliBQ Mar 1, 2022
13f7cca
[AD-612] make macos build post test results with EnricoMi
alinaliBQ Mar 1, 2022
6e2e31a
[AD-612]make windows build post test results with EnricoMi
alinaliBQ Mar 1, 2022
ab212a4
[AD-612] change keyword from path to files
alinaliBQ Mar 2, 2022
38e7c5f
[AD-612] change upload test result to composite action
alinaliBQ Mar 2, 2022
37dc934
[AD-612] modify action for win32
alinaliBQ Mar 2, 2022
459164d
[AD-612] generate test report inside /bin folder
alinaliBQ Mar 2, 2022
0cc2c15
[AD-612] modify path to test result
alinaliBQ Mar 2, 2022
0156e0b
[AD-612] refactor - remove comments
alinaliBQ Mar 2, 2022
8d8d494
[AD-612] debug change path to test result .xml file
alinaliBQ Mar 2, 2022
a0cf149
[AD-612] refactor
alinaliBQ Mar 2, 2022
ab16f0c
[AD-612] remove define boost_test_module
alinaliBQ Mar 2, 2022
a3b5136
[AD-612] refactor
alinaliBQ Mar 2, 2022
8d118c4
[AD-612] specify the test report filename
alinaliBQ Mar 2, 2022
dfad5da
[AD-612] separate comments for different builds
alinaliBQ Mar 3, 2022
585e4fc
[AD-612] separate comments for different builds
alinaliBQ Mar 3, 2022
48b7e9c
[AD-612] add OS version name to comments
alinaliBQ Mar 3, 2022
406e5ea
[AD-612] specify environment version on Yaml
alinaliBQ Mar 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:

jobs:
build-mac:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Get Java distribution
Expand Down Expand Up @@ -79,12 +79,13 @@ jobs:
run: |
ssh -f -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${{env.DOC_DB_PRIV_KEY_FILE}} -L${{env.DOC_DB_LOCAL_PORT}}:${{secrets.DOC_DB_HOST}}:${{env.DOC_DB_REMOTE_PORT}} ${{secrets.DOC_DB_USER}}
./build/odbc/bin/ignite-odbc-tests
# - name: upload-test-report
# if: failure()
# uses: actions/upload-artifact@v2
# with:
# name: test-result-macos
# path: ${{ github.workspace }}/report.xml
- name: upload-test-report
if: always()
uses: EnricoMi/publish-unit-test-result-action/[email protected]
with:
check_name: "MacOS Big Sur 11 Build Unit Test Results Check"
comment_title: "MacOS Big Sur 11 Build Unit Test Results"
files: ./odbc_test_result.xml
# - name: print-memory-leak-logs
# if: always()
# run: |
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/mac-debug-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
build-mac:
runs-on: macos-latest
runs-on: macos-11
env:
NOT_CONNETECD: 1
steps:
Expand Down Expand Up @@ -48,12 +48,13 @@ jobs:
# - name: run-tests
# run: |
# ./build/odbc/bin/tests --gtest_output="xml:report.xml"
# - name: upload-test-report
# if: failure()
# uses: actions/upload-artifact@v2
# with:
# name: test-result-macos
# path: ${{ github.workspace }}\report.xml
- name: upload-test-report
if: always()
uses: EnricoMi/publish-unit-test-result-action/[email protected]
with:
check_name: "MacOS Big Sur 11 Debug Build Unit Test Results Check"
comment_title: "MacOS Big Sur 11 Debug Build Unit Test Results"
files: ./odbc_test_result.xml
# - name: print-memory-leak-logs
# if: always()
# run: |
Expand Down
34 changes: 19 additions & 15 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:

jobs:
build-windows32:
runs-on: windows-latest
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: setup-cppcheck
Expand Down Expand Up @@ -98,12 +98,14 @@ jobs:
run: |
Start-Process -NoNewWindow ssh "-f -N -o UserKnownHostsFile=/temp -o StrictHostKeyChecking=no -i ${{env.DOC_DB_PRIV_KEY_FILE}} -L${{env.DOC_DB_LOCAL_PORT}}:${{secrets.DOC_DB_HOST}}:${{env.DOC_DB_REMOTE_PORT}} ${{secrets.DOC_DB_USER}}"
${{env.ODBC_BIN_PATH}}/ignite-odbc-tests.exe
# - name: upload-test-report
# if: failure()
# uses: actions/upload-artifact@v2
# with:
# name: test-logs-win32
# path: ${{ github.workspace }}\report.xml

- name: upload-test-report
if: always()
uses: EnricoMi/publish-unit-test-result-action/[email protected]
with:
check_name: "Windows x32 Build Unit Test Results Check"
comment_title: "Windows 2022 (x32) Build Unit Test Results"
files: ./odbc_test_result.xml
# - name: build-installer
# if: success()
# run: |
Expand Down Expand Up @@ -131,7 +133,7 @@ jobs:
# name: windows-test-results
# path: $CI_OUTPUT_PATH/test
build-windows64:
runs-on: windows-latest
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: run-cppcheck
Expand Down Expand Up @@ -197,12 +199,14 @@ jobs:
run: |
Start-Process -NoNewWindow ssh "-f -N -o UserKnownHostsFile=/temp -o StrictHostKeyChecking=no -i ${{env.DOC_DB_PRIV_KEY_FILE}} -L${{env.DOC_DB_LOCAL_PORT}}:${{secrets.DOC_DB_HOST}}:${{env.DOC_DB_REMOTE_PORT}} ${{secrets.DOC_DB_USER}}"
${{env.ODBC_BIN_PATH}}/ignite-odbc-tests.exe
# - name: upload-test-report
# if: failure()
# uses: actions/upload-artifact@v2
# with:
# name: test-logs-win64
# path: ${{ github.workspace }}\report.xml

- name: upload-test-report
if: always()
uses: EnricoMi/publish-unit-test-result-action/[email protected]
with:
check_name: "Windows 2022 (x64) Build Unit Test Results Check"
comment_title: "Windows 2022 (x64) Build Unit Test Results"
files: ./odbc_test_result.xml
# - name: build-installer
# if: success()
# run: |
Expand All @@ -224,7 +228,7 @@ jobs:
# name: windows64-installer
# path: ci-output/installer
build-windows64_coverage:
runs-on: windows-latest
runs-on: windows-2022
steps:
- uses: actions/checkout@v2

Expand Down
18 changes: 18 additions & 0 deletions src/odbc-test/src/odbc_test_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <ignite/odbc/common/fixed_size_array.h>
#include <sql.h>
#include <sqlext.h>
#include <fstream>

#include <boost/test/unit_test.hpp>

Expand All @@ -31,6 +32,23 @@
using namespace ignite_test;
using namespace boost::unit_test;

/**
* Test setup config for test results
*/
struct OdbcConfig {
OdbcConfig() : test_log("odbc_test_result.xml") {
unit_test_log.set_stream(test_log);
unit_test_log.set_format(OF_JUNIT);
}
~OdbcConfig() {
unit_test_log.set_stream(std::cout);
}

std::ofstream test_log;
};

BOOST_GLOBAL_FIXTURE(OdbcConfig);

namespace ignite {
namespace odbc {
void OdbcTestSuite::Prepare() {
Expand Down