chore: align repo scaffolding with the package standard #3
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: { POSTGRES_PASSWORD: postgres, POSTGRES_DB: cron } | |
| ports: ["5432:5432"] | |
| options: >- | |
| --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| env: | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/cron | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run check | |
| - run: bun run test:e2e | |
| - name: node consumer smoke | |
| run: | | |
| set -euo pipefail | |
| TARBALL="$PWD/$(npm pack --silent)" | |
| mkdir -p "$RUNNER_TEMP/c" && cd "$RUNNER_TEMP/c" | |
| npm init -y >/dev/null && npm pkg set type=module >/dev/null | |
| npm install "$TARBALL" | |
| node -e 'import("@corbits/cron").then((m) => { for (const n of ["createCronRoutes", "createCronTicker", "isValidCronExpression"]) if (typeof m[n] !== "function") throw new Error("missing export: " + n); })' |