chore(instrumentation-aws-sdk): update metric names to semconv METRIC_*
exports (take 2)
#884
Workflow file for this run
This file contains hidden or 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
name: Test Packages | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
compile: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
env: | |
NPM_CONFIG_UNSAFE_PERM: true | |
NODE_OPTIONS: --max-old-space-size=4096 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
# Use the same Node.js version used for `release-please` workflow. | |
- uses: actions/setup-node@v5 | |
with: | |
node-version: 18 | |
- name: Install | |
run: npm ci --ignore-scripts | |
# Note: when pushing to main we want to test only what changed in | |
# last commit. Otherwise we want to test all changes from origin/main. | |
# So we set the right values for base and head commits depending | |
# on the type of event (PR or push) | |
# ref: https://nx.dev/ci/features/affected#configure-affected-on-ci | |
- name: Set base and head commits | |
run: | | |
if [ "${{github.event_name}}" == "push" ]; then | |
echo "NX_BASE=origin/main~1" >> "$GITHUB_ENV" | |
echo "NX_HEAD=origin/main" >> "$GITHUB_ENV" | |
else | |
echo "NX_BASE=origin/main" >> "$GITHUB_ENV" | |
echo "NX_HEAD=HEAD" >> "$GITHUB_ENV" | |
fi | |
- name: Compile (Delta) | |
run: npm run compile:ci:affected | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: compile-cache-${{ github.run_number }} | |
path: .nx | |
include-hidden-files: true | |
if-no-files-found: error | |
retention-days: 1 | |
unit-test: | |
needs: compile | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- "18.19.0" | |
- "18" | |
- "20.6.0" | |
- "20" | |
- "22" | |
- "24" | |
runs-on: ubuntu-latest | |
services: | |
memcached: | |
image: memcached:1.6.39-alpine | |
ports: | |
- 11211:11211 | |
mongo: | |
image: mongo | |
ports: | |
- 27017:27017 | |
mssql: | |
image: mcr.microsoft.com/mssql/server:2022-latest | |
env: | |
MSSQL_SA_PASSWORD: mssql_passw0rd | |
ACCEPT_EULA: Y | |
ports: | |
- 1433:1433 | |
options: >- | |
--health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -C -Q 'select 1' -b -o /dev/null" | |
--health-interval 1s | |
--health-timeout 30s | |
--health-start-period 10s | |
--health-retries 20 | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_USER: otel | |
MYSQL_PASSWORD: secret | |
MYSQL_DATABASE: otel_mysql_database | |
MYSQL_ROOT_PASSWORD: rootpw | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd="mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
oracledb: | |
image: gvenzl/oracle-free:slim | |
env: | |
APP_USER: otel | |
APP_USER_PASSWORD: secret | |
ORACLE_PASSWORD: oracle | |
ports: | |
- 1521:1521 | |
options: >- | |
--health-cmd "sqlplus system/oracle@//localhost/FREEPDB1" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
postgres: | |
image: postgres:16-alpine | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_DB: otel_pg_database | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
cassandra: | |
image: cassandra:3 | |
ports: | |
- 9042:9042 | |
rabbitmq: | |
image: rabbitmq:3 | |
ports: | |
- 22221:5672 | |
env: | |
RABBITMQ_DEFAULT_USER: username | |
RABBITMQ_DEFAULT_PASS: password | |
env: | |
RUN_CASSANDRA_TESTS: 1 | |
RUN_MEMCACHED_TESTS: 1 | |
RUN_MONGODB_TESTS: 1 | |
RUN_MONGOOSE_TESTS: 1 | |
RUN_MYSQL_TESTS: 1 | |
RUN_MSSQL_TESTS: 1 | |
RUN_ORACLEDB_TESTS: 1 | |
RUN_POSTGRES_TESTS: 1 | |
RUN_REDIS_TESTS: 1 | |
RUN_RABBIT_TESTS: 1 | |
CASSANDRA_HOST: localhost | |
MONGODB_DB: opentelemetry-tests | |
MONGODB_HOST: 127.0.0.1 | |
MONGODB_PORT: 27017 | |
MSSQL_PASSWORD: mssql_passw0rd | |
MYSQL_DATABASE: otel_mysql_database | |
MYSQL_HOST: 127.0.0.1 | |
MYSQL_PASSWORD: secret | |
MYSQL_ROOT_PASSWORD: rootpw | |
MYSQL_PORT: 3306 | |
MYSQL_USER: otel | |
OPENTELEMETRY_MEMCACHED_HOST: localhost | |
OPENTELEMETRY_MEMCACHED_PORT: 11211 | |
OPENTELEMETRY_REDIS_HOST: localhost | |
OPENTELEMETRY_REDIS_PORT: 6379 | |
ORACLE_HOSTNAME: localhost | |
ORACLE_PORT: 1521 | |
ORACLE_CONNECTSTRING: localhost:1521/freepdb1 | |
ORACLE_USER: otel | |
ORACLE_PASSWORD: secret | |
ORACLE_SERVICENAME: FREEPDB1 | |
POSTGRES_DB: otel_pg_database | |
POSTGRES_HOST: localhost | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
NPM_CONFIG_UNSAFE_PERM: true | |
NODE_OPTIONS: --max-old-space-size=4096 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v5 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install | |
run: npm ci | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v5 | |
with: | |
name: compile-cache-${{ github.run_number }} | |
path: .nx | |
# Note: see comment in the compile job | |
- name: Set base and head commits | |
run: | | |
if [ "${{github.event_name}}" == "push" ]; then | |
echo "NX_BASE=origin/main~1" >> "$GITHUB_ENV" | |
echo "NX_HEAD=origin/main" >> "$GITHUB_ENV" | |
else | |
echo "NX_BASE=origin/main" >> "$GITHUB_ENV" | |
echo "NX_HEAD=HEAD" >> "$GITHUB_ENV" | |
fi | |
- name: Compile (Delta) | |
run: npm run compile:ci:affected | |
- name: Unit tests (Browser - Delta) | |
if: ${{ matrix.node == '22' }} | |
run: npm run test:browser:ci:affected | |
- name: Unit tests (Nodejs - Delta) | |
run: npm run test:ci:affected | |
- name: Test All Versions (Delta) | |
run: npm run test-all-versions:ci:affected | |
- name: Upload Test Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-coverage-cache-${{ github.run_number }}-${{ matrix.node }} | |
include-hidden-files: true | |
if-no-files-found: error | |
retention-days: 1 | |
path: | | |
!node_modules | |
packages/*/.nyc_output/** | |
LICENSE | |
test-coverage-report: | |
runs-on: ubuntu-latest | |
needs: unit-test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v5 | |
with: | |
node-version: 18 | |
- name: Install | |
run: npm ci --ignore-scripts | |
# NOTE: keep this in sync with the node versions from `unit-test` job | |
- name: Download Test Artifacts (18) | |
uses: actions/download-artifact@v5 | |
with: | |
name: tests-coverage-cache-${{ github.run_number }}-18 | |
path: . | |
- name: Download Test Artifacts (18.19.0) | |
uses: actions/download-artifact@v5 | |
with: | |
name: tests-coverage-cache-${{ github.run_number }}-18.19.0 | |
path: . | |
- name: Download Test Artifacts (20) | |
uses: actions/download-artifact@v5 | |
with: | |
name: tests-coverage-cache-${{ github.run_number }}-20 | |
path: . | |
- name: Download Test Artifacts (20.6.0) | |
uses: actions/download-artifact@v5 | |
with: | |
name: tests-coverage-cache-${{ github.run_number }}-20.6.0 | |
path: . | |
- name: Download Test Artifacts (22) | |
uses: actions/download-artifact@v5 | |
with: | |
name: tests-coverage-cache-${{ github.run_number }}-22 | |
path: . | |
- name: Download Test Artifacts (24) | |
uses: actions/download-artifact@v5 | |
with: | |
name: tests-coverage-cache-${{ github.run_number }}-24 | |
path: . | |
- name: Report Coverage with Flags | |
run: node ./scripts/codecov-upload-flags.mjs | |
env: | |
COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | |
PR_BRANCH_NAME: ${{ github.event.pull_request.head.label }} | |