Skip to content

refactor(otlp-transformer): migrate to protobuf-es #16300

refactor(otlp-transformer): migrate to protobuf-es

refactor(otlp-transformer): migrate to protobuf-es #16300

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
pull_request:
merge_group:
permissions:
contents: read
jobs:
node-tests:
strategy:
fail-fast: false
matrix:
node_version:
- "18.19.0"
- "18"
- "20.6.0"
- "20"
- "22"
- "24"
- "25"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}
# [email protected] drops support for Node.js v18
# Install the latest npm compatible with this version of Node.js
# - [email protected] supports: {"node":"^20.17.0 || >=22.9.0"}
- run: npm install -g npm@"<11.0.0"
if: ${{
matrix.node_version == '18.19.0' ||
matrix.node_version == '18' ||
matrix.node_version == '20.6.0'
}}
- run: npm install -g [email protected]
if: ${{
matrix.node_version == '20' ||
matrix.node_version == '22' ||
matrix.node_version == '24' ||
matrix.node_version == '25'
}}
- name: Bootstrap
run: npm ci --ignore-scripts
- name: Build 🔧
run: npm run compile
- run: npm test
- name: Report Coverage
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true
node-windows-tests:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '22'
- run: npm install -g [email protected]
- name: Bootstrap
run: npm ci --ignore-scripts
- name: Build 🔧
run: |
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
npm run compile
- name: Unit tests
run: npm run test
browser-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 22
- name: Bootstrap
run: npm ci --ignore-scripts
- name: Build 🔧
run: npm run compile
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true
webworker-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 22
- name: Bootstrap
run: npm ci --ignore-scripts
- name: Build 🔧
run: npm run compile
- name: Unit tests
run: npm run test:webworker
- name: Report Coverage
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true