Skip to content

ci: add CLI PR preview workflow and pin pkg-pr-new #246

ci: add CLI PR preview workflow and pin pkg-pr-new

ci: add CLI PR preview workflow and pin pkg-pr-new #246

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths-ignore:
- "docs/**"
- "**/*.md"
- ".vscode/**"
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "**/*.md"
- ".vscode/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
name: Lint & Typecheck
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- uses: actions/cache@v5
with:
path: |
~/.bun/install/cache
.turbo
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- run: bun install --frozen-lockfile
- run: bun run check
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- uses: actions/cache@v5
with:
path: |
~/.bun/install/cache
.turbo
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- run: bun install --frozen-lockfile
- run: bun run build
- name: Run tests with coverage
run: bun test --coverage --coverage-reporter=lcov --reporter=junit --reporter-outfile=junit.xml
working-directory: packages/cli
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/cli/coverage/lcov.info
fail_ci_if_error: false
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/cli/junit.xml
report_type: test_results