Skip to content

Commit

Permalink
upgrade node from 18 to 20 and use pnpm instead of npm
Browse files Browse the repository at this point in the history
  • Loading branch information
hieupnh committed Sep 22, 2024
1 parent 9ced893 commit 5c3f396
Show file tree
Hide file tree
Showing 7 changed files with 5,292 additions and 8,235 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "npm"
cache: "pnpm"
- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Run build
run: npm run build
run: pnpm run build
- name: Run test
run: npm run test
run: pnpm run test
env:
BLOCKFROST_PROJECT_ID_MAINNET: ${{ secrets.BLOCKFROST_PROJECT_ID_MAINNET }}
BLOCKFROST_PROJECT_ID_TESTNET: ${{ secrets.BLOCKFROST_PROJECT_ID_TESTNET }}
- name: Check format & lint
run: npm run check-format
run: pnpm run check-format
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v20
7 changes: 4 additions & 3 deletions Dockerfile.syncer
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:18
FROM node:20
RUN apt-get update -y && \
apt-get install -y ca-certificates tzdata

WORKDIR /app

COPY package.json package-lock.json ./
COPY package.json pnpm-lock.yaml ./
COPY src/syncer/postgres/prisma ./src/syncer/postgres/prisma
RUN npm ci
RUN corepack enable && corepack install
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
COPY . .
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
REDIS_URL: redis://default:minswap@redis:6379
POSTGRES_URL: postgresql://postgres:minswap@postgres:5432/syncer?schema=public&connection_limit=5
SYNC_START_POINT:
command: npm run syncer:start
command: pnpm run syncer:start

redis:
image: redis:7
Expand Down
Loading

0 comments on commit 5c3f396

Please sign in to comment.