Skip to content

ENG-2405 Harden isolated error recording #76

ENG-2405 Harden isolated error recording

ENG-2405 Harden isolated error recording #76

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun x ultracite check
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- runtime: bun
- runtime: node
node-version: "20"
- runtime: node
node-version: "22"
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- if: matrix.runtime == 'node'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: bun install --frozen-lockfile
- if: matrix.runtime == 'bun'
run: bun run test
- if: matrix.runtime == 'node'
run: node ./node_modules/vitest/vitest.mjs run
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run build
- name: Verify build artifacts
run: |
test -f dist/index.js || (echo "dist/index.js missing" && exit 1)
test -f dist/index.d.ts || (echo "dist/index.d.ts missing" && exit 1)
# PHOTON_OTEL_VERSION is inlined from package.json at build time. Assert on
# the built artifact, because that is what the release pipeline publishes
# after the bot bumps package.json.
- name: Verify dist reports the package version
run: |
bun -e '
const { PHOTON_OTEL_VERSION } = await import("./dist/index.js");
const { version } = await import("./package.json");
if (PHOTON_OTEL_VERSION !== version) {
throw new Error(`dist reports ${PHOTON_OTEL_VERSION}, package.json says ${version}`);
}
'