Skip to content

Commit

Permalink
refactors release creation workflow, fixes #142, fixes #129
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanpo committed Jul 23, 2024
1 parent d7e760f commit a8da092
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build_and_test_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ jobs:
get_version:
runs-on: ubuntu-20.04
steps:
- name: Download OpenTelemetry-Matlab source
uses: actions/checkout@v3
with:
path: opentelemetry-matlab
- name: Get Version
id: getversion
shell: bash
working-directory: opentelemetry-matlab
run: echo "latest_tag=$(sed -re 's/^v?([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)?.*/\1/' <<< $(git describe --tags --abbrev=0))" >> $GITHUB_OUTPUT
build-and-run-tests-ubuntu:
# Running on ubuntu-latest would use a glibc version that is incompatible when using the built mex files on a Debian 11
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build_and_test_simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ jobs:
get_version:
runs-on: ubuntu-20.04
steps:
- name: Download OpenTelemetry-Matlab source
uses: actions/checkout@v3
with:
path: opentelemetry-matlab
- name: Get Version
id: getversion
shell: bash
working-directory: opentelemetry-matlab
run: echo "latest_tag=$(sed -re 's/^v?([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)?.*/\1/' <<< $(git describe --tags --abbrev=0))" >> $GITHUB_OUTPUT
build-and-run-tests-ubuntu:
# Running on ubuntu-latest would use a glibc version that is incompatible when using the built mex files on a Debian 11
Expand Down
4 changes: 3 additions & 1 deletion test/tlogs.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ function testBasic(testCase)
versionidx = find(resourcekeys == "telemetry.sdk.version");
verifyNotEmpty(testCase, versionidx);
versionpattern = digitsPattern + "." + digitsPattern + "." + digitsPattern;
verifyTrue(testCase, matches(results.resourceLogs.resource.attributes(versionidx).value.stringValue, versionpattern));
version_actual = results.resourceLogs.resource.attributes(versionidx).value.stringValue;
verifyTrue(testCase, matches(version_actual, versionpattern), ...
"Invalid version string: " + version_actual);

nameidx = find(resourcekeys == "telemetry.sdk.name");
verifyNotEmpty(testCase, nameidx);
Expand Down
4 changes: 3 additions & 1 deletion test/ttrace.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ function testBasic(testCase)
versionidx = find(resourcekeys == "telemetry.sdk.version");
verifyNotEmpty(testCase, versionidx);
versionpattern = digitsPattern + "." + digitsPattern + "." + digitsPattern;
verifyTrue(testCase, matches(results.resourceSpans.resource.attributes(versionidx).value.stringValue, versionpattern));
version_actual = results.resourceSpans.resource.attributes(versionidx).value.stringValue;
verifyTrue(testCase, matches(version_actual, versionpattern), ...
"Invalid version string: " + version_actual);

nameidx = find(resourcekeys == "telemetry.sdk.name");
verifyNotEmpty(testCase, nameidx);
Expand Down

0 comments on commit a8da092

Please sign in to comment.