Merge pull request #13 from katipally/fix-darwin-x64-build #61
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] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: "1.3.11" | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Guard against version drift | |
| # All internal package.json files must be pinned to "0.0.0-private" — | |
| # the real version is derived from the git tag at release time. This | |
| # fails the build if anyone re-introduces a hardcoded version. | |
| # shell: bash — Windows runners default to PowerShell, which doesn't | |
| # grok `[ -n "$x" ]`. GitHub ships bash on every runner image. | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| bad=$(grep -rE '^ "version":' packages/*/package.json packaging/friday-code/package.json package.json \ | |
| | grep -vE '^[^:]+: "version": "0\.0\.0-private"' || true) | |
| if [ -n "$bad" ]; then | |
| echo "✖ these package.json files have hardcoded versions:" >&2 | |
| echo "$bad" >&2 | |
| echo " → set version to \"0.0.0-private\" (the real version comes from the git tag at release time)" >&2 | |
| exit 1 | |
| fi | |
| echo "✓ all manifests pinned to 0.0.0-private" | |
| - name: Lint & format (Biome) | |
| run: bunx biome ci packages scripts | |
| - name: Typecheck | |
| shell: bash | |
| run: bun run typecheck | |
| - name: Test | |
| run: bun test |