Skip to content

Commit

Permalink
chore: add gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoquelet committed Feb 24, 2025
1 parent b10db09 commit 5b96f27
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/data-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:
pnpm install
fi
# - name: Prettier Format Check
# run: pnpm format:check
- name: Build
run: pnpm build:all

- name: TypeScript Check
run: pnpm ts:check

- name: Build
run: pnpm build
# - name: Prettier Format Check
# run: pnpm format:check
64 changes: 64 additions & 0 deletions .github/workflows/indexer-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Indexer v2 App

on:
push:
paths:
- ".github/workflows/indexer-v2.yml"
- "apps/indexer-v2/**"
- "package.json"
pull_request:
branches:
- main
paths:
- "apps/indexer-v2/**"

jobs:
check-app:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./apps/indexer-v2

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: |
if [ -f "pnpm-lock.yaml" ]; then
pnpm install --frozen-lockfile
else
pnpm install
fi
- name: Build
run: pnpm build:all

- name: TypeScript Check
run: pnpm ts:check

# - name: Prettier Format Check
# run: pnpm format:check
12 changes: 4 additions & 8 deletions .github/workflows/nestjs-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,11 @@ jobs:
pnpm install
fi
- name: Build Prisma client
run: pnpm generate
working-directory: ./packages/indexer-prisma

# - name: Prettier Format Check
# run: pnpm format:check
- name: Build
run: pnpm build:all

- name: TypeScript Check
run: pnpm ts:check

- name: Build
run: pnpm build
# - name: Prettier Format Check
# run: pnpm format:check
2 changes: 1 addition & 1 deletion apps/indexer-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "apibara build",
"build:db": "pnpm -w run build:indexer-v2-db",
"build:all": "pnpm -w run build:indexer-v2-db && apibara build",
"build:all": "pnpm build:db && pnpm build",
"dev": "apibara dev",
"start": "apibara start",
"lint": "biome check .",
Expand Down

0 comments on commit 5b96f27

Please sign in to comment.