Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

61 lines · 1.7 KBRaw History
1name: CI
2
3# Deploy waits for this workflow to pass on main. The end-to-end suite is its own
4# workflow (e2e.yml), so deploys don't wait for it too.
5
6on:
7 push:
8 branches: [main]
9 pull_request:
10
11permissions:
12 contents: read
13
14concurrency:
15 group: ci-${{ github.ref }}
16 cancel-in-progress: true
17
18jobs:
19 # Two jobs in parallel: each needs the install and build, but typecheck and the unit
20 # tests together took longer than either does alone.
21 typecheck:
22 name: Typecheck and bundle
23 runs-on: ubuntu-latest
24 timeout-minutes: 20
25 steps:
26 - uses: actions/checkout@v4
27 - uses: pnpm/action-setup@v4
28 - uses: actions/setup-node@v4
29 with:
30 node-version: 22
31 cache: pnpm
32 - run: pnpm install --frozen-lockfile
33 - name: Build
34 run: pnpm -r --if-present build
35 - name: Typecheck
36 run: pnpm -r --if-present typecheck
37 - name: Bundle the Worker (dry run)
38 working-directory: apps/diffinery
39 run: pnpm exec wrangler deploy --dry-run --env dev --outdir dist
40
41 test:
42 name: Unit tests (${{ matrix.shard }}/2)
43 runs-on: ubuntu-latest
44 timeout-minutes: 20
45 # Two halves of every package's test files, side by side: CI is the first step of a deploy.
46 strategy:
47 fail-fast: false
48 matrix:
49 shard: [1, 2]
50 steps:
51 - uses: actions/checkout@v4
52 - uses: pnpm/action-setup@v4
53 - uses: actions/setup-node@v4
54 with:
55 node-version: 22
56 cache: pnpm
57 - run: pnpm install --frozen-lockfile
58 - name: Build
59 run: pnpm -r --if-present build
60 - name: Unit tests
61 run: pnpm -r --if-present run test --shard=${{ matrix.shard }}/2