Skip to content

P-1925 P-1926 Enhance analytics API with optional parameters and referral config #12

P-1925 P-1926 Enhance analytics API with optional parameters and referral config

P-1925 P-1926 Enhance analytics API with optional parameters and referral config #12

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
# Cancel in-progress runs when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run type check
run: pnpm run typecheck
- name: Run tests with coverage
run: pnpm run test:coverage
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Verify build output exists
run: |
test -d lib/commonjs || (echo "lib/commonjs not found" && exit 1)
test -d lib/module || (echo "lib/module not found" && exit 1)
test -d lib/typescript || (echo "lib/typescript not found" && exit 1)