Skip to content
Merged
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
159 changes: 17 additions & 142 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,164 +2,39 @@ name: ci

on:
push:
branches: [main, nautilus, nexus, injective, trump, ousdt]
branches: [main, testnet]
pull_request:
branches: [main, nautilus, nexus, injective, trump, ousdt]
merge_group:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: |
pnpm install --frozen-lockfile
CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES"
git diff
exit 1
fi

- name: build
run: pnpm run build
env:
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_ID }}
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

typecheck:
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: pnpm

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

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

- name: typecheck
- name: Typecheck
run: pnpm run typecheck

prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

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

- name: prettier
run: |
pnpm run prettier
CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES"
exit 1
fi

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

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

- name: lint
- name: Lint
run: pnpm run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

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

- name: test
- name: Test
run: pnpm run test

- name: Build
run: pnpm run build
env:
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_ID }}
27 changes: 27 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,15 @@ jobs:
pull-requests: write
issues: write
id-token: write
env:
HAS_ANTHROPIC_KEY: ${{ secrets.ANTHROPIC_API_KEY != '' }}
steps:
- name: Skip when ANTHROPIC_API_KEY is not configured
if: env.HAS_ANTHROPIC_KEY != 'true'
run: echo "::notice::ANTHROPIC_API_KEY secret is not set; skipping Claude review."

- name: Get PR SHA
if: env.HAS_ANTHROPIC_KEY == 'true'
id: pr-sha
uses: actions/github-script@v7
with:
Expand All @@ -59,12 +66,14 @@ jobs:
}

- name: Checkout repository
if: env.HAS_ANTHROPIC_KEY == 'true'
uses: actions/checkout@v6
with:
ref: ${{ steps.pr-sha.outputs.head_sha }}
fetch-depth: 0

- name: Run Claude Code Review
if: env.HAS_ANTHROPIC_KEY == 'true'
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Expand Down Expand Up @@ -99,8 +108,15 @@ jobs:
pull-requests: write
issues: write
id-token: write
env:
HAS_ANTHROPIC_KEY: ${{ secrets.ANTHROPIC_API_KEY != '' }}
steps:
- name: Skip when ANTHROPIC_API_KEY is not configured
if: env.HAS_ANTHROPIC_KEY != 'true'
run: echo "::notice::ANTHROPIC_API_KEY secret is not set; skipping Claude review."

- name: Get PR SHA
if: env.HAS_ANTHROPIC_KEY == 'true'
id: pr-sha
uses: actions/github-script@v7
with:
Expand All @@ -117,12 +133,14 @@ jobs:
}

- name: Checkout repository
if: env.HAS_ANTHROPIC_KEY == 'true'
uses: actions/checkout@v6
with:
ref: ${{ steps.pr-sha.outputs.head_sha }}
fetch-depth: 2

- name: Run Claude Security Review
if: env.HAS_ANTHROPIC_KEY == 'true'
uses: anthropics/claude-code-security-review@25e460eb0a12077f0c6a1934d5dbae2f50785dda
with:
claude-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
Expand Down Expand Up @@ -165,8 +183,15 @@ jobs:
pull-requests: write
issues: write
id-token: write
env:
HAS_ANTHROPIC_KEY: ${{ secrets.ANTHROPIC_API_KEY != '' }}
steps:
- name: Skip when ANTHROPIC_API_KEY is not configured
if: env.HAS_ANTHROPIC_KEY != 'true'
run: echo "::notice::ANTHROPIC_API_KEY secret is not set; skipping Claude review."

- name: Get PR SHA
if: env.HAS_ANTHROPIC_KEY == 'true'
id: pr-sha
uses: actions/github-script@v7
with:
Expand All @@ -187,12 +212,14 @@ jobs:
}

- name: Checkout repository
if: env.HAS_ANTHROPIC_KEY == 'true'
uses: actions/checkout@v6
with:
ref: ${{ steps.pr-sha.outputs.head_sha || github.sha }}
fetch-depth: 0

- name: Run Claude Code Assistant
if: env.HAS_ANTHROPIC_KEY == 'true'
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Expand Down
107 changes: 0 additions & 107 deletions .github/workflows/create-merge-prs.yaml

This file was deleted.

Loading
Loading