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:
		
							
								
								
									
										33
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							@@ -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 }}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user