Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2

# buf-setup publishes no moving major tag, so this is pinned exactly. It resolves the
# download URL through the GitHub API even for a pinned buf version, and unauthenticated
# runners share a 60/hr limit — hence the token.
- uses: bufbuild/buf-setup-action@v1.50.0
with:
version: 1.73.0
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Resolve bun cache dir
id: bun-cache
run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT"

- uses: actions/cache@v6
with:
path: ${{ steps.bun-cache.outputs.dir }}
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-

# The lockfile is what makes `make ci` reproducible: src/gen is committed output of the
# pinned protoc-gen-es, so an unpinned install fails check-codegen on a codegen drift
# that isn't one.
- run: bun install --frozen-lockfile

- run: make ci

# `bun run lint` is `biome check --write`, so formatting is fixed rather than failed.
- name: Check for uncommitted changes
run: git diff --exit-code
Loading