From 6e2d7e9792cbf12cda849d52c34a2caddd5717bc Mon Sep 17 00:00:00 2001 From: CyberRex Date: Mon, 16 Jan 2023 06:08:42 +0900 Subject: 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 --- .github/workflows/test.yml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to '.github/workflows/test.yml') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a607a79cb4..48e2b19d6a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} -- cgit v1.2.3-freya