diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a81a4b772..bed2dc7ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -51,4 +54,4 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Run benchmark - run: npm run test:bench + run: pnpm sdk test:bench diff --git a/.github/workflows/create-yorkie-app-publish.yml b/.github/workflows/create-yorkie-app-publish.yml index 32fd124f9..d742af99c 100644 --- a/.github/workflows/create-yorkie-app-publish.yml +++ b/.github/workflows/create-yorkie-app-publish.yml @@ -5,8 +5,8 @@ on: branches: - main paths: - - tools/create-yorkie-app/** - - examples/** + - packages/create-yorkie-app/** + jobs: build: runs-on: ubuntu-latest @@ -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 install + pnpm create 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 }} diff --git a/.github/workflows/devtools-publish.yml b/.github/workflows/devtools-publish.yml index 5b9a45c35..60f0ec173 100644 --- a/.github/workflows/devtools-publish.yml +++ b/.github/workflows/devtools-publish.yml @@ -5,7 +5,7 @@ on: branches: - 'main' paths: - - tools/devtools/** + - packages/devtools/** jobs: build-and-deploy: runs-on: ubuntu-latest @@ -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' diff --git a/.github/workflows/github-page-publish.yml b/.github/workflows/github-page-publish.yml index 08b48e458..08bf05d43 100644 --- a/.github/workflows/github-page-publish.yml +++ b/.github/workflows/github-page-publish.yml @@ -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 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c44279683..b3916a6f3 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -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 }} diff --git a/package.json b/package.json index efa98ab69..ddc9eaaf7 100644 --- a/package.json +++ b/package.json @@ -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",