From ce5a9630ca195857fcca09804ab0388b2f5446ad Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Thu, 16 Mar 2023 21:13:21 +0100 Subject: [PATCH] update workflows --- .github/workflows/api.yml | 24 ++++++++++------------- .github/workflows/test-misskey-js.yml | 28 +++++++++++++++------------ 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index ad6cefbd7..eefa49bf8 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -9,32 +9,28 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3.3.0 - name: Setup Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v3.6.0 with: - node-version: 16.5.0 + node-version: 18.x + cache: 'pnpm' - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.npm - key: npm-${{ hashFiles('package-lock.json') }} - restore-keys: npm- + - run: corepack enable - name: Install dependencies - run: npm ci + run: pnpm i --frozen-lockfile - name: Build - run: npm run build + run: pnpm --filter misskey-js build - name: Check files - run: ls built + run: ls packages/misskey-js/built - name: API report - run: npm run api-prod + run: pnpm --filter misskey-js api-prod - name: Show report if: always() - run: cat temp/misskey-js.api.md + run: cat packages/misskey-js/temp/misskey-js.api.md diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml index 75d38af78..a0d35fa33 100644 --- a/.github/workflows/test-misskey-js.yml +++ b/.github/workflows/test-misskey-js.yml @@ -16,33 +16,37 @@ jobs: strategy: matrix: - node-version: [16.5.0] + node-version: [18.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3.3.0 + + - uses: pnpm/action-setup@v2 + with: + version: 7 + run_install: false - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3.6.0 with: node-version: ${{ matrix.node-version }} + cache: 'pnpm' - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.npm - key: npm-${{ hashFiles('package-lock.json') }} - restore-keys: npm- + - run: corepack enable - name: Install dependencies - run: npm ci + run: pnpm i --frozen-lockfile + + - name: Check pnpm-lock.yaml + run: git diff --exit-code pnpm-lock.yaml - name: Build - run: npm run build + run: pnpm --filter misskey-js build - name: Test - run: npm test + run: pnpm --filter misskey-js test env: CI: true