Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 5 additions & 11 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Install
description: Set up Node and install dependencies with pnpm's package cache.
description: Set up Vite+, Node, and install dependencies.

inputs:
registry-url:
Expand All @@ -10,16 +10,10 @@ inputs:
runs:
using: composite
steps:
- uses: pnpm/action-setup@v4
with:
run_install: false

- uses: actions/setup-node@v6
- uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1
with:
node-version: 24
registry-url: ${{ inputs.registry-url }}
cache: pnpm

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
cache: true
run-install: |
- args: ['--frozen-lockfile']
4 changes: 2 additions & 2 deletions .github/changeset-publish.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { execSync } from "node:child_process";

execSync("pnpm exec tsx ./.github/resolve-workspace-versions.ts", {
execSync("vp exec tsx ./.github/resolve-workspace-versions.ts", {
stdio: "inherit"
});
execSync("pnpm exec changeset publish", {
execSync("vp exec changeset publish", {
stdio: "inherit"
});
8 changes: 4 additions & 4 deletions .github/changeset-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { execSync } from "node:child_process";

// This script is used by the `release.yml` workflow to update the version of the packages being released.
// The standard step is only to run `changeset version` but this does not update the pnpm lockfile.
// So we also run `pnpm install --lockfile-only`, which does this update.
// So we also run `vp install --lockfile-only`, which does this update.
// This is a workaround until this is handled automatically by `changeset version`.
// See https://github.com/changesets/changesets/issues/421.
execSync("pnpm exec changeset version", {
execSync("vp exec changeset version", {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is theree a vpx command? could be nice.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes there is!

stdio: "inherit"
});
execSync("pnpm exec oxfmt --write .", {
execSync("vp fmt --write .", {
stdio: "inherit"
});
execSync("pnpm install --lockfile-only --no-frozen-lockfile", {
execSync("vp install --lockfile-only --no-frozen-lockfile", {
stdio: "inherit"
});
4 changes: 2 additions & 2 deletions .github/workflows/bonk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we pinning these versions? is that better? won't we miss updates?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security.

We did this for all VoidZero projects to avoid hacked actions from taking over our projects. We should frequently update actions (manually, or through renovate), but keep them pinned.


- name: Run Bonk
uses: ask-bonk/ask-bonk/github@main
uses: ask-bonk/ask-bonk/github@8c7a8314f4f4865e2e41e5718dfabc4ab7a2274b # main
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_AI_GATEWAY_ACCOUNT_ID }}
CLOUDFLARE_GATEWAY_ID: ${{ secrets.CF_AI_GATEWAY_NAME }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,52 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 1

- uses: ./.github/actions/install

- run: pnpm run build
- run: vp run build

- name: Get Playwright version
id: playwright-version
run: echo "version=$(node -p 'require(\"playwright/package.json\").version')" >> $GITHUB_OUTPUT

- name: Cache Playwright browsers
uses: actions/cache@v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium
run: vp exec playwright install --with-deps chromium

- name: Run ai-chat e2e tests
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: pnpm exec playwright test --config e2e/playwright.config.ts
run: vp exec playwright test --config e2e/playwright.config.ts
working-directory: packages/ai-chat

e2e-think:
name: "E2E: think (chat recovery)"
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 1

- uses: ./.github/actions/install

- run: pnpm run build
- run: vp run build

- name: Run think e2e tests
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: pnpm run test:e2e
run: vp run test:e2e
working-directory: packages/think
25 changes: 7 additions & 18 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,31 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0
filter: tree:0

- uses: ./.github/actions/install

- uses: nrwl/nx-set-shas@v5

- name: Cache Nx
uses: actions/cache@v5
with:
path: .nx/cache
key: ${{ runner.os }}-nx-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nx-${{ hashFiles('pnpm-lock.yaml') }}-
${{ runner.os }}-nx-

- run: pnpm run build
- run: pnpm run check
- run: vp run build
- run: vp run check

- name: Get Playwright version
id: playwright-version
run: echo "version=$(node -p 'require(\"playwright/package.json\").version')" >> $GITHUB_OUTPUT

- name: Cache Playwright browsers
uses: actions/cache@v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium
run: vp exec playwright install --with-deps chromium

- run: CI=true pnpm exec nx affected -t test
- run: CI=true vp run -r test

- run: pnpm exec pkg-pr-new publish --peerDeps ./packages/*
- run: vp exec pkg-pr-new publish --peerDeps ./packages/*
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,39 @@ jobs:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 1

- uses: ./.github/actions/install
with:
registry-url: "https://registry.npmjs.org"

- run: pnpm run build
- run: pnpm run check
- run: vp run build
- run: vp run check

- name: Get Playwright version
id: playwright-version
run: echo "version=$(node -p 'require(\"playwright/package.json\").version')" >> $GITHUB_OUTPUT

- name: Cache Playwright browsers
uses: actions/cache@v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium
run: vp exec playwright install --with-deps chromium

- run: CI=true pnpm exec nx run-many -t test
- run: CI=true vp run -r test

- id: changesets
uses: changesets/action@v1.7.0
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
with:
version: pnpm exec tsx .github/changeset-version.ts
publish: pnpm exec tsx .github/changeset-publish.ts
version: vp exec tsx .github/changeset-version.ts
publish: vp exec tsx .github/changeset-publish.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
4 changes: 2 additions & 2 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
if: needs.gate.outputs.run == 'true'
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 1
- id: cache-semgrep
uses: actions/cache@v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.local
key: semgrep-1.160.0-${{ runner.os }}
Expand Down
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

12 changes: 0 additions & 12 deletions .oxfmtrc.json

This file was deleted.

23 changes: 0 additions & 23 deletions .oxlintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .vite-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vp staged
Loading
Loading