Typescript Library and Monorepo #75
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: Bun Test & Coverage | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - 'typescript/**' | |
| - '.github/workflows/bun-test.yml' | |
| pull_request: | |
| paths: | |
| - 'typescript/**' | |
| workflow_dispatch: | |
| jobs: | |
| check: | |
| name: Package Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('typescript/bun.lockb') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install dependencies | |
| run: bun install | |
| id: install | |
| working-directory: typescript | |
| - name: Install Anvil | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Generate lcov | |
| run: bun run coverage:lcov | |
| id: coverage | |
| working-directory: typescript | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: typescript/lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true |