From ff0195d821ad5418e2bed79c095c68e43fb59c5a Mon Sep 17 00:00:00 2001 From: Jakub Malinowski Date: Thu, 22 Jul 2021 16:43:11 +0200 Subject: [PATCH] chore: migrate to GH Actions (#194) * chore: migrate to GH Actions * fix: support nodejs 8.5 * fix: drop nodejs 8 * improv: define supported node versions * fix: don't fail fast --- .circleci/config.yml | 45 ---------------------------------------- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++ README.md | 22 +++++++++++++------- package.json | 2 +- 4 files changed, 48 insertions(+), 53 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 935614ef..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,45 +0,0 @@ -version: 2.1 - -orbs: - node: circleci/node@4.1 - -jobs: - build-and-test: - docker: - - image: cimg/node:lts - steps: - - checkout - - node/install-packages: - pkg-manager: npm - - run: - name: Run linter - command: npm run lint - - run: - name: Run tests - command: npm run test - - run: - name: Build - command: npm run compile - - run: - name: Pack - command: npm pack - - run: - name: Copy package to artifacts directory - command: mkdir -p dist && cp splunk-otel-*.tgz dist - - store_artifacts: - path: dist/ - destination: built-packages - - persist_to_workspace: - root: ~/ - paths: project/ - - run: - name: Report coverage - command: npm run codecov - -workflows: - build: - jobs: - - build-and-test: - filters: - tags: - only: /^v[0-9]+\.[0-9]+\.[0-9]+.*/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..ca616ac9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: Continuous Integration +on: + pull_request: + push: + branches: + - main +permissions: read-all + +jobs: + unit-tests: + runs-on: ubuntu-latest + permissions: read-all + strategy: + fail-fast: false + matrix: + nodejs: ['10', '12', '14', '16'] + steps: + - name: Checkout + uses: actions/checkout@v1 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.nodejs }} + - name: Install NPM dependencies + run: npm ci + - name: Lint + run: npm run lint + - name: Test + run: npm run test + - name: Build + run: npm run compile + - name: Report coverage + run: npm run codecov diff --git a/README.md b/README.md index 61ee4474..0a3bf44d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,19 @@ -# Splunk distribution of OpenTelemetry JS - -[![CircleCI](https://circleci.com/gh/signalfx/splunk-otel-js.svg?style=svg)](https://circleci.com/gh/signalfx/splunk-otel-js) -[![codecov](https://codecov.io/gh/signalfx/splunk-otel-js/branch/main/graph/badge.svg?token=XKXjEQKGaK)](https://codecov.io/gh/signalfx/splunk-otel-js) +

+ Beta + GitHub branch checks state + + GitHub release (latest by date) + + npm + node-current + Codecov +

+ +# Splunk distribution of OpenTelemetry JS The Splunk distribution of [OpenTelemetry JS](https://github.com/open-telemetry/opentelemetry-js) provides -multiple installable packages that automatically instruments your Node +multiple installable packages that automatically instruments your Node application to capture and report distributed traces to Splunk APM. This Splunk distribution comes with the following defaults: @@ -116,7 +124,7 @@ In order to send traces directly to SignalFx ingest API, you need to: ## Automatically instrument an application You can use node's `-r` CLI flag to pre-load the instrumentation module and automatically instrument your NodeJS application. -You can add `-r @splunk/otel/instrument` CLI parameter to automatically instrument your application. +You can add `-r @splunk/otel/instrument` CLI parameter to automatically instrument your application. For example, if you start your application as follows: @@ -241,7 +249,7 @@ If log injection is enabled, the corresponding logging library package will need @opentelemetry/instrumentation-winston ``` -You can find more instrumentation packages over at the [OpenTelemetry Registry](https://opentelemetry.io/registry/?language=js) and enable them manually +You can find more instrumentation packages over at the [OpenTelemetry Registry](https://opentelemetry.io/registry/?language=js) and enable them manually as described above. ## Troubleshooting diff --git a/package.json b/package.json index f5b48737..c1e6b8d4 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "stats" ], "engines": { - "node": ">=8.0.0" + "node": ">=8.5.0 <17" }, "files": [ "index.js",