mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	Merge pull request #5638 from ConnectAI-E/chore/test-action
	
		
			
	
		
	
	
		
	
		
			Some checks are pending
		
		
	
	
		
			
				
	
				Run Tests / test (push) Waiting to run
				
			
		
		
	
	
				
					
				
			
		
			Some checks are pending
		
		
	
	Run Tests / test (push) Waiting to run
				
			chore: improve test
This commit is contained in:
		
							
								
								
									
										37
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
name: Run Tests
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
    tags:
 | 
			
		||||
      - "!*"
 | 
			
		||||
  pull_request:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout repository
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Set up Node.js
 | 
			
		||||
        uses: actions/setup-node@v3
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 18
 | 
			
		||||
          cache: "yarn"
 | 
			
		||||
 | 
			
		||||
      - name: Cache node_modules
 | 
			
		||||
        uses: actions/cache@v4
 | 
			
		||||
        with:
 | 
			
		||||
          path: node_modules
 | 
			
		||||
          key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
 | 
			
		||||
          restore-keys: |
 | 
			
		||||
            ${{ runner.os }}-node_modules-
 | 
			
		||||
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        run: yarn install
 | 
			
		||||
 | 
			
		||||
      - name: Run Jest tests
 | 
			
		||||
        run: yarn test:ci
 | 
			
		||||
@@ -6,13 +6,13 @@
 | 
			
		||||
    "mask": "npx tsx app/masks/build.ts",
 | 
			
		||||
    "mask:watch": "npx watch \"yarn mask\" app/masks",
 | 
			
		||||
    "dev": "concurrently -r \"yarn run mask:watch\" \"next dev\"",
 | 
			
		||||
    "build": "yarn test:ci && yarn mask && cross-env BUILD_MODE=standalone next build",
 | 
			
		||||
    "build": "yarn mask && cross-env BUILD_MODE=standalone next build",
 | 
			
		||||
    "start": "next start",
 | 
			
		||||
    "lint": "next lint",
 | 
			
		||||
    "export": "yarn test:ci && yarn mask && cross-env BUILD_MODE=export BUILD_APP=1 next build",
 | 
			
		||||
    "export": "yarn mask && cross-env BUILD_MODE=export BUILD_APP=1 next build",
 | 
			
		||||
    "export:dev": "concurrently -r \"yarn mask:watch\"  \"cross-env BUILD_MODE=export BUILD_APP=1 next dev\"",
 | 
			
		||||
    "app:dev": "concurrently -r \"yarn mask:watch\" \"yarn tauri dev\"",
 | 
			
		||||
    "app:build": "yarn test:ci && yarn mask && yarn tauri build",
 | 
			
		||||
    "app:build": "yarn mask && yarn tauri build",
 | 
			
		||||
    "prompts": "node ./scripts/fetch-prompts.mjs",
 | 
			
		||||
    "prepare": "husky install",
 | 
			
		||||
    "proxy-dev": "sh ./scripts/init-proxy.sh && proxychains -f ./scripts/proxychains.conf yarn dev",
 | 
			
		||||
@@ -88,4 +88,4 @@
 | 
			
		||||
    "lint-staged/yaml": "^2.2.2"
 | 
			
		||||
  },
 | 
			
		||||
  "packageManager": "yarn@1.22.19"
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user