Use pnpm for package manager (#9531)

* Use pnpm for package manager

* Fix

* Change github workflow

* use pnpm in workflow

* fix

* Fix test (e2e/jest)

* Update Dockerfile for pnpm

* Exclude node_modules from file search on VSCode

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Move typescript from devDependencies to dependencies

* Fix Dockerfile

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
CyberRex
2023-01-16 06:08:42 +09:00
committed by GitHub
parent 39349dcba5
commit 6e2d7e9792
16 changed files with 13580 additions and 19342 deletions

View File

@ -8,22 +8,26 @@ on:
pull_request:
jobs:
yarn_install:
pnpm_install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- uses: actions/setup-node@v3.6.0
with:
node-version: 18.x
cache: 'yarn'
cache: 'pnpm'
- run: corepack enable
- run: yarn install --immutable
- run: pnpm i --frozen-lockfile
lint:
needs: [yarn_install]
needs: [pnpm_install]
runs-on: ubuntu-latest
continue-on-error: true
strategy:
@ -37,10 +41,14 @@ jobs:
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- uses: actions/setup-node@v3.6.0
with:
node-version: 18.x
cache: 'yarn'
cache: 'pnpm'
- run: corepack enable
- run: yarn install --immutable
- run: yarn workspace ${{ matrix.workspace }} run lint
- run: pnpm i --frozen-lockfile
- run: pnpm --filter ${{ matrix.workspace }} run lint

View File

@ -23,7 +23,6 @@ jobs:
env:
POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust
YARN_CHECKSUM_BEHAVIOR: update
redis:
image: redis:6
ports:
@ -33,21 +32,26 @@ jobs:
- uses: actions/checkout@v3.3.0
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: 'pnpm'
- run: corepack enable
- run: yarn install --immutable
- name: Check yarn.lock
run: git diff --exit-code yarn.lock
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
- name: Copy Configure
run: cp .github/misskey/test.yml .config
- name: Build
run: yarn build
run: pnpm build
- name: Test
run: yarn jest-and-coverage
run: pnpm jest-and-coverage
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
@ -86,19 +90,22 @@ jobs:
# if: ${{ matrix.browser == 'firefox' }}
#- uses: browser-actions/setup-firefox@latest
# if: ${{ matrix.browser == 'firefox' }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: 'pnpm'
- run: corepack enable
- run: yarn install --immutable
env:
YARN_CHECKSUM_BEHAVIOR: update
- run: pnpm i --frozen-lockfile
- name: Copy Configure
run: cp .github/misskey/test.yml .config
- name: Build
run: yarn build
run: pnpm build
# https://github.com/cypress-io/cypress/issues/4351#issuecomment-559489091
- name: ALSA Env
run: echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc
@ -106,7 +113,7 @@ jobs:
uses: cypress-io/github-action@v4
with:
install: false
start: yarn start:test
start: pnpm start:test
wait-on: 'http://localhost:61812'
headless: false
browser: ${{ matrix.browser }}