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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 74 additions & 74 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
name: CI

on:
push:
branches: [main, '**']
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://anchor:anchor@localhost:5432/anchor_kit_smoke
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: anchor
POSTGRES_PASSWORD: anchor
POSTGRES_DB: anchor_kit_smoke
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U anchor -d anchor_kit_smoke"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Verify PostgreSQL test service
run: |
test -n "$DATABASE_URL"
bun -e 'const { Client } = await import("pg"); const client = new Client({ connectionString: process.env.DATABASE_URL }); await client.connect(); await client.query("SELECT 1"); await client.end();'

- name: PostgreSQL adapter assertions
run: bun test tests/runtime/postgres-adapter.integration.test.ts

- name: Lint
run: bun run lint

- name: Format Check
run: bun run format:check

- name: Type Check
run: bun run typecheck

- name: Fallow Health
run: bun run scripts/check-fallow-health.mjs

- name: Run Tests with Coverage
run: bun run test:coverage

- name: Build
run: bun run build

- name: Node PostgreSQL package smoke test
run: bun run smoke:node-postgres
env:
DATABASE_URL: postgres://anchor:anchor@127.0.0.1:5432/anchor_kit_smoke
name: CI
on:
push:
branches: [main, '**']
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://anchor:anchor@localhost:5432/anchor_kit_smoke
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: anchor
POSTGRES_PASSWORD: anchor
POSTGRES_DB: anchor_kit_smoke
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U anchor -d anchor_kit_smoke"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Verify PostgreSQL test service
run: |
test -n "$DATABASE_URL"
bun -e 'const { Client } = await import("pg"); const client = new Client({ connectionString: process.env.DATABASE_URL }); await client.connect(); await client.query("SELECT 1"); await client.end();'
- name: PostgreSQL adapter assertions
run: bun test tests/runtime/postgres-adapter.integration.test.ts
- name: Lint
run: bun run lint
- name: Format Check
run: bun run format:check
- name: Type Check
run: bun run typecheck
- name: Fallow Health
run: bun run scripts/check-fallow-health.mjs
- name: Run Tests with Coverage
run: bun run test:coverage
- name: Build
run: bun run build
- name: Node PostgreSQL package smoke test
run: bun run smoke:node-postgres
env:
DATABASE_URL: postgres://anchor:anchor@127.0.0.1:5432/anchor_kit_smoke
144 changes: 72 additions & 72 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
name: Publish to npm

on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
publish:
if: github.repository == 'Anchor-kit/anchor-kit'
runs-on: ubuntu-latest
environment: npm-publish
steps:
- name: Checkout release tag
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Lint
run: bun run lint

- name: Type check
run: bun run typecheck

- name: Test
run: bun run test

- name: Verify release tag matches package version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: |
TAG_VERSION="${TAG_NAME#v}"
PKG_VERSION=$(node -p "require('./package.json').version")

echo "Release tag: ${TAG_NAME}"
echo "Package version: ${PKG_VERSION}"

if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
echo "Release tag does not match package.json version. Refusing publish."
exit 1
fi

- name: Build package
run: bun run build

- name: Verify npm package contents
run: bun run check:pack

- name: Update npm for trusted publishing support
run: npm install -g npm@latest

- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Publish to npm
on:
release:
types: [published]
permissions:
contents: read
id-token: write
jobs:
publish:
if: github.repository == 'Anchor-kit/anchor-kit'
runs-on: ubuntu-latest
environment: npm-publish
steps:
- name: Checkout release tag
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Type check
run: bun run typecheck
- name: Test
run: bun run test
- name: Verify release tag matches package version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: |
TAG_VERSION="${TAG_NAME#v}"
PKG_VERSION=$(node -p "require('./package.json').version")
echo "Release tag: ${TAG_NAME}"
echo "Package version: ${PKG_VERSION}"
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
echo "Release tag does not match package.json version. Refusing publish."
exit 1
fi
- name: Build package
run: bun run build
- name: Verify npm package contents
run: bun run check:pack
- name: Update npm for trusted publishing support
run: npm install -g npm@latest
- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.idea
node_modules
dist
.env
.DS_Store
setup-repo.ts
tsconfig.tsbuildinfo
.fallow/
.idea
node_modules
dist
.DS_Store
setup-repo.ts
tsconfig.tsbuildinfo
.fallow/
config.bat
Loading