docs+ci: refresh docs, workflows, and PR template for the bun + turbo + apps/ layout #117
Workflow file for this run
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint & format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.5 | |
| - run: bun install | |
| - name: Prettier (format check) | |
| run: bun run format:check | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.5 | |
| - run: bun install | |
| - run: bun run typecheck | |
| test: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.5 | |
| - run: bun install | |
| - run: bun run build | |
| - run: bun run test | |
| smoke-cli: | |
| name: Smoke test CLI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.5 | |
| - run: bun install | |
| - name: Build CLI + core | |
| run: bun run --filter @slop-detect/core build && bun run --filter slop-detect build | |
| - name: Install Playwright Chromium | |
| run: bunx playwright install --with-deps chromium | |
| - name: Scan a known-clean page (HN) | |
| run: | | |
| cd packages/cli | |
| node dist/bin/slop.js https://news.ycombinator.com --json > result.json | |
| cat result.json | |
| score=$(node -e "console.log(JSON.parse(require('fs').readFileSync('result.json')).score)") | |
| echo "Score: $score" | |
| if [ "$score" -gt 12 ]; then | |
| echo "::error::Hacker News should score Clean (< 12), got $score" | |
| exit 1 | |
| fi |