Add frontend build check (#498)
This commit is contained in:
		
							parent
							
								
									7a476e31ed
								
							
						
					
					
						commit
						f7892d7f2f
					
				
							
								
								
									
										36
									
								
								.github/workflows/frontend-build-check.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								.github/workflows/frontend-build-check.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | ||||
| name: Frontend Build Check | ||||
| on: | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - 'frontend/src/**' | ||||
|       - 'frontend/*.json' | ||||
|       - 'frontend/*.js' | ||||
|       - 'frontend/*.ts' | ||||
| jobs: | ||||
|   setup-and-build: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|       - name: Setup Node | ||||
|         uses: actions/setup-node@v3 | ||||
|         with: | ||||
|           node-version: '16' | ||||
|           cache: 'yarn' | ||||
|           cache-dependency-path: frontend/yarn.lock | ||||
|       - name: Restore cache | ||||
|         uses: actions/cache@v3 | ||||
|         with: | ||||
|           path: frontend/dist | ||||
|           key: ${{ runner.os }}-btrix-frontend-build-${{ hashFiles('frontend/dist') }} | ||||
|           restore-keys: | | ||||
|             ${{ runner.os }}-btrix-frontend-build- | ||||
|       - name: Install dependencies | ||||
|         working-directory: frontend | ||||
|         run: yarn install --frozen-lockfile | ||||
|       - name: Localization build | ||||
|         working-directory: frontend | ||||
|         run: yarn localize:prepare | ||||
|       - name: Webpack build | ||||
|         working-directory: frontend | ||||
|         run: yarn build | ||||
| @ -28,10 +28,9 @@ | ||||
|   "scripts": { | ||||
|     "prepare": "cd .. && husky install frontend/.husky", | ||||
|     "test": "web-test-runner \"src/**/*.test.{ts,js}\" --node-resolve --playwright --browsers chromium", | ||||
|     "prebuild": "del-cli ./dist && yarn localize:prepare", | ||||
|     "prebuild": "del-cli ./dist", | ||||
|     "build": "webpack --config webpack.prod.js", | ||||
|     "build-dev": "webpack --mode development", | ||||
|     "prestart": "yarn localize:prepare", | ||||
|     "start": "webpack serve --mode=development --config webpack.dev.js", | ||||
|     "lint": "eslint --fix \"src/**/*.{ts,js}\"", | ||||
|     "format": "prettier --write \"src/**/*.{ts,js,html,css,json}\"", | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user