Skip to content

feat: project bootstrap (Bun + TypeScript + CI infrastructure) #2

feat: project bootstrap (Bun + TypeScript + CI infrastructure)

feat: project bootstrap (Bun + TypeScript + CI infrastructure) #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Build + Lint + Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Type check
run: bun run typecheck
- name: Lint
run: bun run lint
- name: Validate catalog.json schema
run: bun run validate-catalog
- name: Test with coverage and JUnit report
run: |
bun test \
--coverage \
--coverage-reporter=lcov \
--coverage-dir=./coverage \
--reporter=junit \
--reporter-outfile=./junit.xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: bootstrap
fail_ci_if_error: false
continue-on-error: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./junit.xml
flags: bootstrap
report_type: test_results
fail_ci_if_error: false
continue-on-error: true