Skip to content

Commit 7bf4ac4

Browse files
committed
update testing with main, move code coverage to build_and_test_full
1 parent 52c6af2 commit 7bf4ac4

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

.github/workflows/build_and_test_full.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- testing
89
env:
910
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }}
1011
jobs:
@@ -56,6 +57,45 @@ jobs:
5657
uses: matlab-actions/run-tests@v2
5758
with:
5859
select-by-folder: opentelemetry-matlab/test
60+
code-coverage-build-and-run-tests-ubuntu:
61+
# Running on ubuntu-latest would use a glibc version that is incompatible when using the built mex files on a Debian 11
62+
# Instead, run on ubuntu-20.04
63+
runs-on: ubuntu-20.04
64+
needs: get_version
65+
env:
66+
OPENTELEMETRY_MATLAB_INSTALL: "${{ github.workspace }}/otel_matlab_install"
67+
SYSTEM_LIBSTDCPP_PATH: "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
68+
steps:
69+
- name: Download OpenTelemetry-Matlab source
70+
uses: actions/checkout@v3
71+
with:
72+
path: opentelemetry-matlab
73+
- name: Install ninja-build
74+
run: sudo apt-get install ninja-build
75+
- name: Install MATLAB
76+
uses: matlab-actions/setup-matlab@v2
77+
with:
78+
products: MATLAB_Compiler MATLAB_Compiler_SDK
79+
- name: Build OpenTelemetry-Matlab
80+
working-directory: opentelemetry-matlab
81+
run: |
82+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON -DWITH_OTLP_GRPC=ON -DUSE_BATCH_FOR_MCC=ON -DOTEL_MATLAB_VERSION=${{ needs.get_version.outputs.version }} -DCMAKE_INSTALL_PREFIX=${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
83+
cmake --build build --config Release --target install
84+
- name: Run tests & get coverage
85+
env:
86+
# Add the installation directory to the MATLAB Search Path by
87+
# setting the MATLABPATH environment variable.
88+
MATLABPATH: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
89+
uses: matlab-actions/run-tests@v2
90+
with:
91+
source-folder: ${{ env.OPENTELEMETRY_MATLAB_INSTALL }}
92+
code-coverage-cobertura: cobertura.xml
93+
- name: Upload Codecov
94+
uses: codecov/codecov-action@v4
95+
with:
96+
token: ${{ secrets.CODECOV_TOKEN }}
97+
slug: mathworks/OpenTelemetry-Matlab
98+
file: cobertura.xml
5999
build-and-run-tests-windows:
60100
runs-on: windows-latest
61101
needs: get_version

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# MATLAB Interface to OpenTelemetry
2-
[![View OpenTelemetry-Matlab on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/130979-opentelemetry-matlab) [![MATLAB](https://github.com/mathworks/OpenTelemetry-Matlab/actions/workflows/build_and_test_full.yml/badge.svg)](https://github.com/mathworks/OpenTelemetry-Matlab/actions/workflows/build_and_test_full.yml)
2+
[![View OpenTelemetry-Matlab on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/130979-opentelemetry-matlab) [![MATLAB](https://github.com/mathworks/OpenTelemetry-Matlab/actions/workflows/build_and_test_full.yml/badge.svg)](https://github.com/mathworks/OpenTelemetry-Matlab/actions/workflows/build_and_test_full.yml)[![codecov](https://codecov.io/github/mathworks/OpenTelemetry-MATLAB/graph/badge.svg?token=VNj6f1LlMG)](https://codecov.io/github/mathworks/OpenTelemetry-MATLAB)
33

44
MATLAB® interface to [OpenTelemetry™](https://opentelemetry.io/), based on the [OpenTelemetry Specification](https://opentelemetry.io/docs/specs/otel/). OpenTelemetry is an observability framework for creating and managing telemetry data, such as traces, metrics, and logs. This data can then be sent to an observability back-end for monitoring, alerts, and analysis.
55

codecov.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ignore:
2+
- "**/*.test"
3+
fixes:
4+
- "\\+opentelemetry/\\+sdk/\\+trace/::sdk/trace/+opentelemetry/+sdk/+trace/"
5+
- "\\+opentelemetry/\\+sdk/\\+metrics/::sdk/metrics/+opentelemetry/+sdk/+metrics/"
6+
- "\\+opentelemetry/\\+sdk/\\+common/::sdk/common/+opentelemetry/+sdk/+common/"
7+
- "\\+opentelemetry/\\+trace/::api/trace/+opentelemetry/+trace/"
8+
- "\\+opentelemetry/\\+metrics/::api/metrics/+opentelemetry/+metrics/"
9+
- "\\+opentelemetry/\\+context/::api/context/+opentelemetry/+context/"
10+
- "\\+opentelemetry/\\+common/::api/common/+opentelemetry/+common/"
11+
- "\\+opentelemetry/\\+baggage/::api/baggage/+opentelemetry/+baggage/"
12+
- "\\+opentelemetry/\\+exporters/\\+otlp/::exporters/otlp/+opentelemetry/+exporters/+otlp/"
13+
- "\\+opentelemetry/\\+sdk/\\+logs::sdk/logs/+opentelemetry/+sdk/+logs/"
14+
- "\\+opentelemetry/\\+logs/::api/logs/+opentelemetry/+logs/"

0 commit comments

Comments
 (0)