forked from open-webui/open-webui
		
	refac: ci
This commit is contained in:
		
							parent
							
								
									b391ad12ae
								
							
						
					
					
						commit
						90a03c331d
					
				
					 3 changed files with 33 additions and 18 deletions
				
			
		
							
								
								
									
										7
									
								
								.github/workflows/format-backend.yaml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/workflows/format-backend.yaml
									
										
									
									
										vendored
									
									
								
							|  | @ -2,8 +2,13 @@ name: Python CI | ||||||
| 
 | 
 | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
|     branches: ['main'] |     branches: | ||||||
|  |       - main | ||||||
|  |       - dev | ||||||
|   pull_request: |   pull_request: | ||||||
|  |     branches: | ||||||
|  |       - main | ||||||
|  |       - dev | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
|  |  | ||||||
							
								
								
									
										43
									
								
								.github/workflows/format-build-frontend.yaml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										43
									
								
								.github/workflows/format-build-frontend.yaml
									
										
									
									
										vendored
									
									
								
							|  | @ -1,25 +1,36 @@ | ||||||
| name: Bun CI | name: Frontend Build | ||||||
|  | 
 | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
|     branches: ['main'] |     branches: | ||||||
|  |       - main | ||||||
|  |       - dev | ||||||
|   pull_request: |   pull_request: | ||||||
|  |     branches: | ||||||
|  |       - main | ||||||
|  |       - dev | ||||||
|  | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
|     name: 'Format & Build Frontend' |     name: 'Format & Build Frontend' | ||||||
|     env: |  | ||||||
|       PUBLIC_API_BASE_URL: '' |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - name: Checkout Repository | ||||||
|       - name: Use Bun |         uses: actions/checkout@v4 | ||||||
|         uses: oven-sh/setup-bun@v1 | 
 | ||||||
|       - run: bun --version |       - name: Setup Node.js | ||||||
|       - name: Install frontend dependencies |         uses: actions/setup-node@v3 | ||||||
|         run: bun install |         with: | ||||||
|       - name: Format frontend |           node-version: '20' # Or specify any other version you want to use | ||||||
|         run: bun run format | 
 | ||||||
|       - name: Check for changes after format |       - name: Install Dependencies | ||||||
|  |         run: npm install | ||||||
|  | 
 | ||||||
|  |       - name: Format Frontend | ||||||
|  |         run: npm run format | ||||||
|  | 
 | ||||||
|  |       - name: Check for Changes After Format | ||||||
|         run: git diff --exit-code |         run: git diff --exit-code | ||||||
|       - name: Build frontend | 
 | ||||||
|         if: always() |       - name: Build Frontend | ||||||
|         run: bun run build |         run: npm run build | ||||||
|  |  | ||||||
|  | @ -13,7 +13,6 @@ | ||||||
| 		"lint:types": "npm run check", | 		"lint:types": "npm run check", | ||||||
| 		"lint:backend": "pylint backend/", | 		"lint:backend": "pylint backend/", | ||||||
| 		"format": "prettier --plugin-search-dir --write '**/*.{js,ts,svelte,css,md,html,json}'", | 		"format": "prettier --plugin-search-dir --write '**/*.{js,ts,svelte,css,md,html,json}'", | ||||||
| 		"format:backend": "yapf --recursive backend -p -i", |  | ||||||
| 		"i18n:parse": "i18next --config i18next-parser.config.ts && prettier --write 'src/lib/i18n/**/*.{js,json}'" | 		"i18n:parse": "i18next --config i18next-parser.config.ts && prettier --write 'src/lib/i18n/**/*.{js,json}'" | ||||||
| 	}, | 	}, | ||||||
| 	"devDependencies": { | 	"devDependencies": { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek