Skip to content

Commit

Permalink
Update .yml files to use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
gwbaik9717 committed Aug 12, 2024
1 parent 95cc381 commit c121bf8
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 46 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,34 @@ jobs:
node-version: [18.x]
steps:
- uses: actions/checkout@v2

- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: 'pnpm'

- name: Cache Node Moudles
- name: Cache pnpm store
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-pnpm-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
run: pnpm install

- run: npm run lint
- run: npm run build
- run: npm run build:examples
- run: pnpm sdk lint
- run: pnpm sdk build
- run: pnpm build:examples
- run: docker compose -f docker/docker-compose-ci.yml up --build -d
- run: npm run test:ci
- run: pnpm sdk test:ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
Expand All @@ -51,4 +54,4 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Run benchmark
run: npm run test:bench
run: pnpm sdk test:bench
13 changes: 6 additions & 7 deletions .github/workflows/create-yorkie-app-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
branches:
- main
paths:
- tools/create-yorkie-app/**
- examples/**
- packages/create-yorkie-app/**

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,17 +21,16 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Install and Build 🔧
run: |
cd tools/create-yorkie-app
npm install
npm run build
pnpm create-yorkie-app install
pnpm create-yorkie-app build
- name: Publish 🚀
run: cd tools/create-yorkie-app && npm publish --provenance
run: cd packages/create-yorkie-app && pnpm publish --provenance
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 5 additions & 6 deletions .github/workflows/devtools-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- 'main'
paths:
- tools/devtools/**
- packages/devtools/**
jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -17,16 +17,15 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache: 'pnpm'

- name: Install and Build 🔧
run: |
cd tools/devtools
npm install
npm run build
pnpm devtools install
pnpm devtools build
- name: Deploy 🚀
uses: PlasmoHQ/bpp@v3
with:
keys: ${{ secrets.BPP_KEYS }}
chrome-file: 'tools/devtools/dist/chrome-mv3-prod.zip'
chrome-file: 'packages/devtools/dist/chrome-mv3-prod.zip'
22 changes: 11 additions & 11 deletions .github/workflows/github-page-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: package-lock.json
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

- name: Cache Node Moudles
- name: Cache pnpm store
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-pnpm-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
run: pnpm install

- name: Build 🔧
run: |
npm run build
npm run build:docs
npm run build:examples
npm run build:ghpages
pnpm sdk build
pnpm sdk build:docs
pnpm build:examples
pnpm sdk build:ghpages
- name: Deploy 🚀
uses: peaceiris/actions-gh-pages@v3
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,31 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node 🔧
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: package-lock.json
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml
registry-url: 'https://registry.npmjs.org'

- name: Cache Node Moudles
- name: Cache pnpm store
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-pnpm-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
run: pnpm install

- run: npm run build
- run: npm publish --provenance
- run: pnpm sdk build
- run: pnpm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"simultaneous-cursors": "pnpm --filter=simultaneous-cursors",
"vanilla-codemirror6": "pnpm --filter=vanilla-codemirror6",
"vanilla-quill": "pnpm --filter=vanilla-quill",
"vuejs-kanban": "pnpm --filter=vuejs-kanban"
"vuejs-kanban": "pnpm --filter=vuejs-kanban",
"build:examples": "pnpm --filter './examples/*' run build"
},
"keywords": [],
"author": "ChaCha",
Expand Down

0 comments on commit c121bf8

Please sign in to comment.