Skip to content

test(econify): add test for period-total count blocking in batch proc… #53

test(econify): add test for period-total count blocking in batch proc…

test(econify): add test for period-total count blocking in batch proc… #53

Workflow file for this run

name: "econify: publish to JSR"
on:
push:
tags:
- "econify-v*"
concurrency:
group: "econify-${{ github.ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/econify
steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
cache: true
# v2 supports built-in cache; external cache step not needed
- name: Run tests with coverage (parallel)
run: deno test -A --coverage=coverage --parallel
env:
DENO_JOBS: 4 # Optimize for GitHub Actions runners (2-4 cores)
- name: Generate LCOV (exclude non-critical modules)
run: deno coverage coverage --lcov --exclude="src/io/|src/historical/|src/fx/live_fx.ts|src/inflation/inflation.ts|src/inference/inference.ts" > coverage/lcov.info
- name: Enforce 80% coverage
run: deno run --allow-read scripts/check_coverage.ts coverage/lcov.info 80
publish:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: packages/econify
steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
cache: true
# v2 supports built-in cache; external cache step not needed
- name: Verify tag matches deno.json version
run: |
ver=$(jq -r .version deno.json)
expected="refs/tags/econify-v$ver"
echo "GITHUB_REF=$GITHUB_REF, expected=$expected"
if [ "$GITHUB_REF" != "$expected" ]; then
echo "Tag ($GITHUB_REF) does not match deno.json version ($ver)"
exit 1
fi
- name: Publish dry-run
run: deno publish --dry-run
- name: Publish to JSR
env:
JSR_TOKEN: ${{ secrets.JSR_TOKEN }}
run: deno publish