License pooled balances: lifecycle, batch transitions, and runtime #258
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: Leaf Unit Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [dev] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| concurrency: | |
| group: leaf-unit-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Check changed files | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| outputs: | |
| leaf: ${{ steps.filter.outputs.leaf }} | |
| steps: | |
| # paths-filter diffs via the API on pull_request but needs a local repo on push. | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check changed files | |
| id: filter | |
| uses: dorny/paths-filter@6852f92c20ea7fd3b0c25de3b5112db3a98da050 | |
| with: | |
| filters: | | |
| leaf: | |
| - "apps/leaf/**" | |
| - "shared/**" | |
| - "packages/**" | |
| - "package.json" | |
| - "bun.lock" | |
| - ".github/workflows/leaf-unit-tests.yml" | |
| unit-tests: | |
| name: Unit Tests | |
| needs: changes | |
| if: needs.changes.outputs.leaf == 'true' | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| # The suite is hermetic: db/env modules are mocked and the script's env | |
| # values are placeholders, so no Postgres or API server is needed. | |
| - name: Run unit tests | |
| run: bun run test | |
| working-directory: apps/leaf |