feat: add example for configuration with Dash0 #50
Workflow file for this run
This file contains 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: "Build" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci --ignore-scripts | |
- name: lint | |
run: npm run lint:ci | |
- name: format check | |
run: npm run format:ci | |
- name: build | |
run: npm run build | |
- name: package | |
run: npm run package | |
- name: validate dist | |
run: | | |
git diff | |
exit $(git status --porcelain | wc -l) | |
tests: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci --ignore-scripts | |
- name: run tests | |
run: npm run test:ci | |
- uses: inception-health/otel-upload-test-artifact-action@v1 | |
if: always() | |
with: | |
jobName: "tests (${{ matrix.os }})" | |
stepName: "run tests" | |
path: "junit.xml" | |
type: "junit" | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
otel-cicd: | |
needs: [tests, build] | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Export workflow | |
uses: ./ | |
with: | |
otlpEndpoint: "test" | |
otlpHeaders: "test" | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
OTEL_CONSOLE_ONLY: "true" |