-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Config for tests * Added static check and GitHub workflow for it * Marked test_php_static_check.sh as executable * Give human readable names to stages in test-php-static-check.yml * Revert back to `return new CompletedFuture(null)` in `ElasticHttpTransport::send` * Fixed issues found by static analysis in the changes from main * Added ability to run multiple PHP version to test_php_static_check.sh * Fixed PHP versions format in test-php-static-check.yml matrix * Switched to generated list of the supported PHP versions Generating list of the supported PHP versions by reading from ./elastic-otel-php.properties * Make new workflow names more aligned with the existing * echo -n instead of echo in generate-php-versions.yml * Fixed issues with list generation * Refactored to have only one workflows triggered on PR * Fixed main merge * Implemented infrastructure for Component tests * Added SpanAttributesExpectations * Added ExceptionUtil::runCatchLogRethrow * Removed HTTP related attributes from transaction span for CLI script * Adapted TransactionSpanTest to changes in "Removed HTTP related ... Adapted TransactionSpanTest to changes in "Removed HTTP related attributes from transaction span for CLI script" * Fixed issues found by static analysis * Removed PHPUnit assert wrappers * Implemented smoke component test for curl auto-instrumentation * Fixed merge issues * Added license header * Fixed inferred spans * Fixed line endings * Added stubs for elastic_otel_hook and elastic_otel_is_enabled * Added running PHP part unit tests to CI build * Added execute permissions to php_static_check_and_unit_tests.sh * Fixed workflow step name * Fixed DebugContextTest::testAddedTextFormat unit test on Linux * Fixed DebugContextTest::testAddedTextFormat unit test on Linux * Fixed DebugContextTest::testTrimVendorFrames on PHP 8.4 * Aligned workflow names * Improved tests progress display * Added execute permissions to test_php_static_and_unit.sh * Added generate_component_tests_matrix.sh and test for it * Fixed merge * Fixed license header * Fixed copy & paste error in test-packages-component-tests.yml * Remove split by ',' in generate-component-tests-matrix.yml * Fixed hardcoded 8.4 as the highest supported PHP version in tools/build/build_packages.sh * Fixed string generated by generate-component-tests-matrix.yml * Upload component tests logs * Make component tests failure fail the whole build * Investigate why packages are not downloaded * Try wildcard to download all packages * Move all downloaded packages from sub-directories * Added matrix row unpack and test for it * Move component tests related scripts to a separate directory * Give shorter names to GitHub workflows jobs * Shorten GitHub workflow job name * Implemented component tests workflow * Fixed incorrect command line option names * Fixed select_elastic_otel_package_file * Added sections to printout * Fixed component tests Dockerfile_apk * Fixed component tests Dockerfile_rpm * Print last test case log on failure * Fixed print_last_test_case * Fixed print_last_test_case * Fixed on_script_exit * Added extract of the log for the last test case and for the 100 lines * Turn off bash tracing for component scripts by default * List content of /elastic_otel_php_tests/logs/ * Rearranged GitHub workflow group markers to avoid nesting * Change ownership of files copied inside docker container to allow docker host to read them * Fixed passing user ID and user group ID * Enabled bash tracing to debug failure * Temporary disabled testRunAndEscalateLogLevelOnFailure ComponentTestsUtilComponentTest::testRunAndEscalateLogLevelOnFailure since it's flaky. We will fix after CI for component tests is merged. * Fixed workflow names * Set the same permissions for copied syslog as for created files * Set the same permissions for copied syslog as for created files * Fixed calculation for number of lines to tail for last test case part of log * Fixed log ending extraction when there are no test case start lines logged * Redirect redundant output to /dev/null --------- Co-authored-by: Pawel Filipczak <[email protected]>
- Loading branch information
1 parent
3a425a3
commit 5029ca8
Showing
54 changed files
with
2,395 additions
and
144 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
|
||
# Generates matrix for component tests | ||
name: generate-component-tests-matrix | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
matrix: | ||
description: "Matrix for component tests" | ||
value: ${{ jobs.generate-component-tests-matrix.outputs.matrix }} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
generate-component-tests-matrix: | ||
name: generate-component-tests-matrix | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.generate.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: generate | ||
run: | | ||
MATRIX_JSON=$(./tools/test/component/generate_matrix.sh | jq --raw-input --slurp -c 'split("\n") | map(select(length > 0)) | map({ "row": . } )') | ||
echo "matrix={\"include\":${MATRIX_JSON}}" | ||
echo "matrix={\"include\":${MATRIX_JSON}}" >> $GITHUB_OUTPUT |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
|
||
name: test-packages-component-tests | ||
|
||
on: | ||
workflow_call: ~ | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
BUILD_PACKAGES_SUB_DIR: build/packages | ||
COMPONENT_TESTS_LOGS_SUB_DIR: build/component_tests_logs | ||
|
||
jobs: | ||
generate-component-tests-matrix: | ||
uses: ./.github/workflows/generate-component-tests-matrix.yml | ||
|
||
run-component-tests-in-docker-for-one-matrix-row: | ||
name: row | ||
runs-on: 'ubuntu-latest' | ||
needs: generate-component-tests-matrix | ||
timeout-minutes: 300 | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.generate-component-tests-matrix.outputs.matrix) }} | ||
env: | ||
MATRIX_ROW: ${{ matrix.row }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download built packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: packages-* | ||
path: ${{ env.BUILD_PACKAGES_SUB_DIR }} | ||
|
||
- name: Run component tests | ||
continue-on-error: false | ||
run: | | ||
mv "${PWD}/${{ env.BUILD_PACKAGES_SUB_DIR }}/"*/* "${PWD}/${{ env.BUILD_PACKAGES_SUB_DIR }}/" | ||
rm -rf "${PWD}/${{ env.BUILD_PACKAGES_SUB_DIR }}/packages-"* | ||
./tools/test/component/test_packages_one_matrix_row_in_docker.sh --matrix_row "${MATRIX_ROW}" --packages_dir "${PWD}/${{ env.BUILD_PACKAGES_SUB_DIR }}" --logs_dir "${PWD}/${{ env.COMPONENT_TESTS_LOGS_SUB_DIR }}" | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
continue-on-error: false | ||
with: | ||
name: test-packages-component-tests-${{ matrix.row }} | ||
path: | | ||
${{ env.COMPONENT_TESTS_LOGS_SUB_DIR }}/* |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
|
||
# Runs the build based on the provided files in test.yml | ||
name: build | ||
name: test-phpt | ||
|
||
on: | ||
workflow_call: | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
version=0.3.0 | ||
supported_php_versions=(81 82 83 84) | ||
supported_package_types=(apk deb rpm) | ||
test_all_php_versions_with_package_type=deb | ||
test_app_code_host_kinds_short_names=(cli http) | ||
test_groups_short_names=(no_ext_svc with_ext_svc) | ||
php_headers_version=2.0 | ||
logger_features_enum_values=ALL=0,MODULE=1,REQUEST=2,TRANSPORT=3,BOOTSTRAP=4,HOOKS=5,INSTRUMENTATION=6,OTEL=7,DEPGUARD=8 |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.