Skip to content

Commit d7fd3fa

Browse files
committed
Merge branch 'main' into anthropic-evals
2 parents 331b07b + c8c59be commit d7fd3fa

File tree

82 files changed

+8246
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+8246
-171
lines changed

.changeset/config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
"access": "restricted",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
10-
"ignore": []
10+
"ignore": [],
11+
"privatePackages": {
12+
"version": true,
13+
"tag": true
14+
}
1115
}

.changeset/lazy-trains-send.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/ripe-hornets-count.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/upset-bugs-dress.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/actions/setup/action.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Setup Node.js Environment'
2+
description: 'Install pnpm, Node.js, and project dependencies'
3+
4+
inputs:
5+
node-version:
6+
description: 'Node.js version to use'
7+
required: false
8+
default: '22'
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Install pnpm
14+
# note: version is inferred from the packageManager field in package.json
15+
uses: pnpm/action-setup@v4
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ inputs.node-version }}
21+
cache: 'pnpm'
22+
23+
- name: Install dependencies
24+
shell: bash
25+
run: pnpm install --frozen-lockfile --child-concurrency=10

.github/workflows/branches.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Branches
2+
on:
3+
push:
4+
branches-ignore: ['main']
5+
6+
env:
7+
FORCE_COLOR: 1
8+
9+
jobs:
10+
test:
11+
name: Test & Check
12+
runs-on: ubuntu-24.04
13+
permissions:
14+
contents: read
15+
timeout-minutes: 10
16+
strategy:
17+
matrix:
18+
node-version: [20, 22]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: ./.github/actions/setup
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Syncpack lint
26+
run: pnpm check:deps
27+
- name: Run linter
28+
run: pnpm check:turbo
29+
- name: Run linter (formatting)
30+
run: pnpm check:format
31+
- name: Run tests
32+
run: pnpm test
33+
34+
build-workers:
35+
name: Build Workers
36+
runs-on: ubuntu-24.04
37+
permissions:
38+
contents: read
39+
timeout-minutes: 10
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: ./.github/actions/setup
43+
44+
- name: Build Workers
45+
run: pnpm turbo deploy -- -e staging --dry-run

.github/workflows/evals.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,19 @@ name: Evals
22
on:
33
push:
44

5+
env:
6+
FORCE_COLOR: 1
7+
58
jobs:
69
eval:
10+
name: Eval
711
runs-on: ubuntu-24.04
8-
strategy:
9-
matrix:
10-
node-version: [22]
12+
permissions:
13+
contents: read
14+
timeout-minutes: 10
1115
steps:
1216
- uses: actions/checkout@v4
13-
- name: Install pnpm
14-
uses: pnpm/action-setup@v4
15-
with:
16-
version: 10.8.0
17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: ${{ matrix.node-version }}
21-
cache: 'pnpm'
17+
- uses: ./.github/actions/setup
2218
- name: Create .dev.vars file
2319
run: |
2420
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" > ./apps/sandbox-container/.dev.vars
@@ -35,7 +31,5 @@ jobs:
3531
run: |
3632
du -h ./apps/sandbox-container/.dev.vars
3733
du -h ./apps/workers-bindings/.dev.vars
38-
- name: Install dependencies
39-
run: pnpm install --frozen-lockfile --child-concurrency=10
4034
- name: Run evals
4135
run: pnpm eval:ci

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
env:
8+
FORCE_COLOR: 1
9+
10+
jobs:
11+
deploy-staging:
12+
name: Deploy (staging)
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: read
16+
timeout-minutes: 10
17+
concurrency: ${{ github.workflow }}-deploy-staging
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v4
21+
- uses: ./.github/actions/setup
22+
23+
# Run tests & checks before deploying
24+
- name: Syncpack lint
25+
run: pnpm check:deps
26+
- name: Run linter
27+
run: pnpm check:turbo
28+
- name: Run linter (formatting)
29+
run: pnpm check:format
30+
- name: Run tests
31+
run: pnpm test
32+
33+
- name: Deploy Workers (staging)
34+
run: pnpm turbo deploy -- -e staging
35+
env:
36+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
37+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
env:
8+
FORCE_COLOR: 1
9+
10+
jobs:
11+
create-release-pr:
12+
name: Create Release PR
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
timeout-minutes: 5
18+
concurrency: ${{ github.workflow }}-create-release-pr
19+
outputs:
20+
published: ${{ steps.create-release-pr.outputs.published }}
21+
steps:
22+
- name: Checkout Repo
23+
uses: actions/checkout@v4
24+
- uses: ./.github/actions/setup
25+
- name: Create Release PR
26+
id: create-release-pr
27+
uses: changesets/action@v1
28+
with:
29+
publish: pnpm changeset publish
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
- name: Save Published Packages
33+
if: steps.create-release-pr.outputs.published == 'true'
34+
run: |
35+
echo '${{steps.create-release-pr.outputs.publishedPackages}}' \
36+
> ${{ github.workspace }}/published-packages.json
37+
- name: Upload Published Packages
38+
if: steps.create-release-pr.outputs.published == 'true'
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: published-packages
42+
path: ${{ github.workspace }}/published-packages.json
43+
44+
deploy-production:
45+
name: Deploy (production)
46+
needs: create-release-pr
47+
if: needs.create-release-pr.outputs.published == 'true'
48+
runs-on: ubuntu-24.04
49+
timeout-minutes: 10
50+
concurrency: ${{ github.workflow }}-deploy-production
51+
permissions:
52+
contents: read
53+
steps:
54+
- name: Checkout Repo
55+
uses: actions/checkout@v4
56+
- name: Download published packages
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: published-packages
60+
path: ${{ runner.temp }}
61+
- uses: ./.github/actions/setup
62+
- name: Deploy Published Workers (production)
63+
run: pnpm runx deploy-published-workers --env production
64+
env:
65+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
66+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/test-and-check.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)