feat(apm): add data pipeline package #752
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: Build | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| - run: yarn install | |
| - run: yarn install | |
| working-directory: test/crashtracker | |
| - run: yarn lint | |
| build-apm-data-pipeline: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24 | |
| - name: Add WASM target | |
| run: rustup target add wasm32-unknown-unknown | |
| - run: npm ci --prefix packages/apm-data-pipeline | |
| - run: cargo install wasm-pack --locked | |
| - run: npm run build --prefix packages/apm-data-pipeline | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: apm-data-pipeline-dist | |
| path: packages/apm-data-pipeline/dist | |
| test-apm-data-pipeline: | |
| needs: build-apm-data-pipeline | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [18, 24] | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - run: npm ci --prefix packages/apm-data-pipeline | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: apm-data-pipeline-dist | |
| path: packages/apm-data-pipeline/dist | |
| - if: matrix.node == 18 | |
| # Node 18's experimental node:test runner retains a completed WASM | |
| # callback. Run the same exporter assertions from a global async entry | |
| # point, then keep node:test coverage for the remaining test files. | |
| working-directory: packages/apm-data-pipeline | |
| run: | | |
| node -e "const { runExporterTests } = require('./test/exporter'); (async () => { await runExporterTests(); process.exit(0) })().catch((error) => { console.error(error); process.exit(1) })" | |
| node --test test/bundlers.test.js test/package.test.js | |
| - if: matrix.node != 18 | |
| run: npm test --prefix packages/apm-data-pipeline | |
| - run: npm run test:package --prefix packages/apm-data-pipeline | |
| build-test-wasm: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| crate: | |
| - library_config | |
| - datadog-js-zstd | |
| - pipeline | |
| - sketches | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: 'Use composite action' | |
| uses: ./.github/actions/build-test-wasm | |
| with: | |
| crate: '${{ matrix.crate }}' | |
| build: | |
| uses: Datadog/action-prebuildify/.github/workflows/build.yml@main | |
| needs: build-test-wasm | |
| with: | |
| package-manager: 'yarn' | |
| cache: false | |
| min-node-version: 18 | |
| rust: true | |
| only: darwin-arm64,darwin-x64,linux-arm64,linux-x64 | |
| # Need this, now that libdatadog packages libunwind as a submodule | |
| prebuild: '(command -v apk >/dev/null && apk add autoconf automake libtool) || (command -v apt-get >/dev/null && apt-get update && apt-get install -y autoconf automake libtool) || true' | |
| package-size: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| - run: yarn install | |
| - name: Compute module size tree and report | |
| uses: qard/heaviest-objects-in-the-universe@v1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |