| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- name: Test Template
- on:
- workflow_call:
- inputs:
- WITH_COVERAGE:
- required: false
- type: number
- default: 0
- CTEST_START:
- required: false
- type: number
- default: 1
- CTEST_END:
- required: false
- type: number
- default: 999999
- UNITY_BUILD:
- required: false
- type: number
- default: 1
- artifact_name:
- required: true
- type: string
- build_artifact_name:
- required: true
- type: string
- results_name:
- required: true
- type: string
- timeout:
- required: false
- type: number
- default: 60
- xml_command:
- required: false
- type: string
- default: "cd build; cp -r Testing/2*/Test.xml .; xsltproc -o junit_tests.xml ../misc/junit/ctest2junit.xsl Test.xml"
- COLUMNAR_LOCATOR:
- required: false
- type: string
- default: ""
- jobs:
- test:
- name: ${{ inputs.CTEST_START }}_${{ inputs.CTEST_END }}
- runs-on: ubuntu-22.04
- timeout-minutes: ${{ inputs.timeout }}
- continue-on-error: true
- defaults:
- run:
- shell: bash
- container:
- image: manticoresearch/ubertests_public:331
- env:
- DIAGNOSTIC: 1
- CACHEB: ../cache
- NO_BUILD: 1
- CTEST_START: ${{ inputs.CTEST_START }}
- CTEST_END: ${{ inputs.CTEST_END }}
- # The following is useful to test a specific test, just uncomment it, no need to disable CTEST_START/END
- # CTEST_REGEX: test_234
- WITH_COVERAGE: ${{ inputs.WITH_COVERAGE }}
- LIBS_BUNDLE:
- UNITY_BUILD: ${{ inputs.UNITY_BUILD }}
- COLUMNAR_LOCATOR: ${{ inputs.COLUMNAR_LOCATOR }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- - name: Tests container entrypoint
- run: bash /entry_point.sh &
- - name: Check out cache before building
- uses: actions/cache@v4
- with:
- path: cache
- enableCrossOsArchive: true
- key: build_linux_debug_x86_64
- - name: Download build artifacts
- uses: manticoresoftware/download_artifact_with_retries@v3
- with:
- name: ${{ inputs.build_artifact_name }}
- path: .
- - name: List files
- run: find .
- - name: 🚀 Test
- id: test
- # --timeout may be not working https://gitlab.kitware.com/cmake/cmake/-/issues/23979
- # use -VV instead of -V to get more verbose output
- run: |
- ctest -V -S misc/ctest/gltest.cmake --no-compress-output --timeout 600
- continue-on-error: true
- - name: Check test results
- if: always()
- run: |
- if [ "${{ steps.test.outcome }}" == "failure" ]; then
- echo "❌ Tests failed ❌"
- exit 1
- fi
-
- - name: List build files
- if: always()
- run: find build
- continue-on-error: true
- - name: Prepare test report xmls
- if: always()
- continue-on-error: true
- run: ${{ inputs.xml_command }}
- - 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/junit*.xml build/status* build/test/error*.txt build/test/*log build/test/test_*/report* build/test/rt_*/report* build/test/col_*/report*"
- - name: Publish test results
- if: always()
- continue-on-error: true
- uses: manticoresoftware/publish-unit-test-result-action@v2
- with:
- check_name: ${{ inputs.results_name }}
- files: build/junit*.xml
- compare_to_earlier_commit: false
- comment_mode: failures
-
|