Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
76 changes: 19 additions & 57 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,79 +392,41 @@ jobs:
name: Windows tests
needs: [build_windows, win_bundle, check_branch]
uses: ./.github/workflows/win_test_template.yml
strategy:
fail-fast: false
matrix:
name: [1_400, 401_650, 651_and_on]
include:
- name: 1_400
start: 1
end: 400
- name: 401_650
start: 401
end: 650
- name: 651_and_on
start: 651
end: 999999
with:
CTEST_START: ${{ matrix.start }}
CTEST_END: ${{ matrix.end }}
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
artifact_name: windows_test_${{ matrix.name }}
artifact_name: windows_test_results
results_name: "Windows test results"

windows_tests_report:
name: Windows tests summary and report
prepare_windows_test_results:
name: Prepare Windows test results
needs: test_windows
runs-on: ubuntu-22.04
continue-on-error: true
defaults:
run:
shell: bash
container:
image: manticoresearch/ubertests_public:331
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download test report artifacts 1_400
uses: manticoresoftware/download_artifact_with_retries@v3
continue-on-error: true
with:
name: windows_test_1_400
path: .
- name: Download test report artifacts 401_650
- name: Download build artifacts
uses: manticoresoftware/download_artifact_with_retries@v3
continue-on-error: true
with:
name: windows_test_401_650
name: windows_test_results
path: .
- name: Download test report artifacts 651_and_on
uses: manticoresoftware/download_artifact_with_retries@v3
- name: Prepare test report xmls
if: always()
continue-on-error: true
with:
name: windows_test_651_and_on
path: .
- name: Convert the XML to JUnit format
run: |
shopt -s nullglob
for dir in build/xml_*; do
if [ -d "$dir" ] && [ -f "$dir/Test.xml" ]; then
xsltproc -o "$dir/junit_tests.xml" misc/junit/ctest2junit.xsl "$dir/Test.xml"
fi
done
shell: bash
find .
xsltproc -o junit_tests.xml misc/junit/ctest2junit.xsl "$(find build/Testing -name Test.xml | head -n 1)"
- name: Publish test results
uses: manticoresoftware/publish-unit-test-result-action@v2
with:
check_name: Windows test results
compare_to_earlier_commit: false
files: build/xml_*/junit_tests.xml
comment_mode: failures
- name: Per-test results
# IMPORTANT: The value of 3 below should correspond to the test shard count, needs.<job_name>.strategy.job-total doesn't work
run: |
for file in build/status*; do echo -n "$file: "; cat "$file"; done
grep -o "success" build/status* | wc -l | awk '{if ($1==3) exit 0; else {print "Found only "$1" successful runs out of 3"; exit 1}}'
shell: bash
- name: Upload combined artifacts
if: always()
continue-on-error: true
uses: manticoresoftware/upload_artifact_with_retries@v4
uses: manticoresoftware/publish-unit-test-result-action@v2
with:
name: windows_test_resuls
path: build
check_name: "Windows test results"
files: junit*.xml
compare_to_earlier_commit: false
comment_mode: failures
5 changes: 2 additions & 3 deletions .github/workflows/test_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ jobs:
continue-on-error: true
uses: manticoresoftware/publish-unit-test-result-action@v2
with:
check_name: ${{ inputs.results_name }}
check_name: "${{ inputs.results_name }}"
files: build/junit*.xml
compare_to_earlier_commit: false
comment_mode: failures

comment_mode: failures
34 changes: 21 additions & 13 deletions .github/workflows/win_test_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ on:
artifact_name:
required: true
type: string
results_name:
required: true
type: string
COLUMNAR_LOCATOR:
required: false
type: string
default: ""

UNITY_BUILD:
required: false
type: number
default: 1

jobs:
test_windows:
name: ${{ inputs.CTEST_START }}_${{ inputs.CTEST_END }}
Expand All @@ -35,6 +42,7 @@ jobs:
# CTEST_REGEX: test_234
NO_BUILD: 1
COLUMNAR_LOCATOR: ${{ inputs.COLUMNAR_LOCATOR }}
UNITY_BUILD: ${{ inputs.UNITY_BUILD }}
steps:
- name: Checkout repository # We have to checkout to access .github/workflows/ in further steps
uses: actions/checkout@v3
Expand Down Expand Up @@ -64,7 +72,7 @@ jobs:
C:\PROGRA~1\MySQL\"MySQL Server 8.0"\bin\mysqld.exe --initialize-insecure
C:\PROGRA~1\MySQL\"MySQL Server 8.0"\bin\mysqld.exe --install mysql
net start mysql
mysql -e "create user 'test'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; create database test; grant all on test.* to 'test'@'localhost'; flush privileges;" -uroot
mysql -e "create user 'test'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; create database test; grant all on test.* to 'test'@'localhost'; create database test1; grant all on test1.* to 'test'@'localhost'; create database test2; grant all on test2.* to 'test'@'localhost'; create database test3; grant all on test3.* to 'test'@'localhost'; create database test4; grant all on test4.* to 'test'@'localhost'; create database test5; grant all on test5.* to 'test'@'localhost'; create database test6; grant all on test6.* to 'test'@'localhost'; create database test7; grant all on test7.* to 'test'@'localhost'; create database test8; grant all on test8.* to 'test'@'localhost'; create database test9; grant all on test9.* to 'test'@'localhost'; flush privileges;" -uroot
# TODO: Uncomment the below if there's no more OpenSSL in the runner like it happened in Sep 2023 (https://github.com/actions/runner-images/issues/8344)
# - name: Install OpenSSL
# run: powershell.exe ./.github/workflows/Install-OpenSSL.ps1
Expand All @@ -77,23 +85,23 @@ jobs:
id: test
# --timeout may be not working https://gitlab.kitware.com/cmake/cmake/-/issues/23979
# Add -VV to ctest to display extra debug info
run: ctest -VV -S misc/ctest/gltest.cmake --no-compress-output --timeout 600
continue-on-error: true
- name: Remember status
if: always()
run: echo "${{ steps.test.outcome }}" > build/status_${{ inputs.CTEST_START }}_${{ inputs.CTEST_END }}
run: |
$env:CTEST_RESOURCE = (Resolve-Path ".\misc\ctest\ubertests\ubertests_docker_image\resource.json").Path
ctest -VV -S misc/ctest/gltest.cmake --no-compress-output --timeout 600
continue-on-error: true
- name: Prepare test results

- name: Check test results
if: always()
run: |
mkdir build/xml_${{ inputs.CTEST_START }}_${{ inputs.CTEST_END }}
cp -r build/Testing/2*/*.xml build/xml_${{ inputs.CTEST_START }}_${{ inputs.CTEST_END }}/
mv build/test build/test_${{ inputs.CTEST_START }}_${{ inputs.CTEST_END }}
continue-on-error: true
if ("${{ steps.test.outcome }}" -eq "failure") {
Write-Host "❌ Tests failed ❌"
exit 1
}

- name: Upload test artifacts
if: always()
continue-on-error: true
uses: manticoresoftware/upload_artifact_with_retries@v4
with:
name: ${{ inputs.artifact_name }}
path: "build/xml* build/test_*/test_*/report* build/test_*/error*.txt build/test_*/*log build/status* build/test_*/*mdmp"
path: "*.xml build/Testing/*/*.xml build/xml build/junit*.xml build/test/error*.txt build/test/*log build/test/test_*/report* build/test/rt_*/report* build/test/col_*/report*"
Loading