Skip to content

Commit

Permalink
update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yiliangzhou committed Nov 22, 2024
1 parent 81762d8 commit d99e781
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/run-lib-injection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
matrix: ${{ steps.compute-matrix.outputs.matrix }}
matrix_supported_langs: ${{ steps.compute-matrix.outputs.matrix_supported_langs }}
matrix_profiling_supported: ${{ steps.compute-matrix.outputs.matrix_profiling_supported }}
matrix_skip_basic: ${{ steps.compute-matrix.outputs.matrix_skip_basic }}
init_image: ${{ steps.compute-matrix.outputs.init_image }}
steps:
- name: Compute matrix
Expand All @@ -43,7 +44,7 @@ jobs:
"golang": [],
"java": [{"name":"dd-lib-java-init-test-app","supported":"true"},
{"name":"jdk7-app","supported":"false"},
{"name":"dd-djm-spark-test-app", "supported":"true", "skip-profiling":"true"}],],
{"name":"dd-djm-spark-test-app", "supported":"true", "skip-profiling":"true", "skip-basic":"true"}],],
"nodejs": [{"name":"sample-app","supported":"true"},{"name":"sample-app-node13","supported":"false"}],
"php": [],
"python": [{"name":"dd-lib-python-init-test-django","supported":"true"},
Expand Down Expand Up @@ -82,11 +83,14 @@ jobs:
#Only supported weblog variants
results_supported_langs = []
results_profiling_supported = []
results_skip_basic = []
for weblog in weblogs["${{ inputs.library }}"]:
if weblog["supported"] == "true":
results_supported_langs.append(weblog["name"])
if "skip-profiling" not in weblog or weblog["skip-profiling"] != "true":
results_profiling_supported.append(weblog["name"])
if "skip-basic" not in weblog or weblog["skip-basic"] != "true":
results_skip_basic.append(weblog["name"])
#Use the latest init image for prod version, latest_snapshot init image for dev version
if "${{ inputs.version }}" == 'prod':
Expand All @@ -99,11 +103,13 @@ jobs:
print(f'init_image={json.dumps(result_init_image)}', file=fh)
print(f'matrix_supported_langs={json.dumps(results_supported_langs)}', file=fh)
print(f'matrix_profiling_supported={json.dumps(results_profiling_supported)}', file=fh)
print(f'matrix_skip_basic={json.dumps(results_skip_basic)}', file=fh)
print(json.dumps(result, indent=2))
print(json.dumps(result_init_image, indent=2))
print(json.dumps(results_supported_langs, indent=2))
print(json.dumps(results_profiling_supported, indent=2))
print(json.dumps(results_skip_basic, indent=2))
lib-injection-init-image-validator:
if: inputs.library == 'dotnet' || inputs.library == 'java' || inputs.library == 'python' || inputs.library == 'ruby' || inputs.library == 'nodejs'
Expand Down Expand Up @@ -233,13 +239,18 @@ jobs:
- name: Kubernetes lib-injection tests
id: k8s-lib-injection-tests
if: ${{ ! contains(fromJson(needs.compute-matrix.outputs.matrix_skip_basic), matrix.weblog) }}
run: ./run.sh K8S_LIBRARY_INJECTION_BASIC

- name: Kubernetes lib-injection profiling tests
id: k8s-lib-injection-tests-profiling
if: ${{ contains(fromJson(needs.compute-matrix.outputs.matrix_profiling_supported), matrix.weblog) }}
run: ./run.sh K8S_LIBRARY_INJECTION_PROFILING

- name: Kubernetes lib-injection DJM tests
id: k8s-lib-injection-tests-djm
run: ./run.sh K8S_LIBRARY_INJECTION_PROFILING

- name: Compress logs
id: compress_logs
if: always() && steps.build.outcome == 'success'
Expand Down

0 comments on commit d99e781

Please sign in to comment.