Skip to content

Commit

Permalink
ci: use pnpm on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Sep 23, 2021
1 parent 902f4f6 commit 640800e
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,36 @@ jobs:
with:
node-version: ${{ matrix.node_version }}

- name: Get yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Set dependencies cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
${{ runner.os }}-${{ matrix.node_version }}-
- name: Versions
run: yarn versions

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install pnpm + deps
uses: pnpm/action-setup@v2.0.1
with:
version: 6.15.1
run_install: |
- args: [--frozen-lockfile]
- name: Build vite
run: yarn ci-build-vite
run: pnpm run ci-build-vite

- name: Build plugin-vue
run: yarn build-plugin-vue
run: pnpm run build-plugin-vue

- name: Build plugin-react
run: yarn build-plugin-react
run: pnpm run build-plugin-react

- name: Test serve
run: yarn test-serve --runInBand
run: pnpm run test-serve --runInBand

- name: Test build
run: yarn test-build --runInBand
run: pnpm run test-build --runInBand

lint:
runs-on: ubuntu-latest
Expand All @@ -87,17 +84,23 @@ jobs:
- name: Set dependencies cache
uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: lint-dependencies-${{ hashFiles('yarn.lock') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
lint-dependencies-${{ hashFiles('yarn.lock') }}
lint-dependencies-
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
${{ runner.os }}-${{ matrix.node_version }}-
- name: Install pnpm + deps
uses: pnpm/action-setup@v2.0.1
with:
version: 6.15.1
run_install: |
- args: [--frozen-lockfile]
- name: Prepare
run: |
yarn install --frozen-lockfile
yarn ci-build-vite
yarn build-plugin-vue
pnpm run ci-build-vite
pnpm run build-plugin-vue
- name: Lint
run: yarn lint
run: pnpm run lint

0 comments on commit 640800e

Please sign in to comment.