mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	workflow: update lint.yml
This commit is contained in:
		
							parent
							
								
									57fc56613a
								
							
						
					
					
						commit
						1ea5ad71ce
					
				
							
								
								
									
										65
									
								
								.github/workflows/lint.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										65
									
								
								.github/workflows/lint.yml
									
									
									
									
										vendored
									
									
								
							@ -1,28 +1,61 @@
 | 
				
			|||||||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
 | 
					---
 | 
				
			||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
 | 
					#################################
 | 
				
			||||||
 | 
					#################################
 | 
				
			||||||
 | 
					## Super Linter GitHub Actions ##
 | 
				
			||||||
 | 
					#################################
 | 
				
			||||||
 | 
					#################################
 | 
				
			||||||
 | 
					name: Lint Code Base
 | 
				
			||||||
 | 
					
 | 
				
			||||||
name: Node.js CI
 | 
					#
 | 
				
			||||||
 | 
					# Documentation:
 | 
				
			||||||
 | 
					# https://help.github.com/en/articles/workflow-syntax-for-github-actions
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#############################
 | 
				
			||||||
 | 
					# Start the job on all push #
 | 
				
			||||||
 | 
					#############################
 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  push:
 | 
					  push:
 | 
				
			||||||
    branches: [main]
 | 
					    branches-ignore: main
 | 
				
			||||||
 | 
					    # Remove the line above to run when pushing to master
 | 
				
			||||||
  pull_request:
 | 
					  pull_request:
 | 
				
			||||||
    branches: [main]
 | 
					    branches: main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					###############
 | 
				
			||||||
 | 
					# Set the Job #
 | 
				
			||||||
 | 
					###############
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  build:
 | 
					  build:
 | 
				
			||||||
 | 
					    # Name the Job
 | 
				
			||||||
 | 
					    name: Lint Code Base
 | 
				
			||||||
 | 
					    # Set the agent to run on
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    strategy:
 | 
					    ##################
 | 
				
			||||||
      matrix:
 | 
					    # Load all steps #
 | 
				
			||||||
        node-version: [12.x, 14.x, 16.x]
 | 
					    ##################
 | 
				
			||||||
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v2
 | 
					      ##########################
 | 
				
			||||||
      - name: Use Node.js ${{ matrix.node-version }}
 | 
					      # Checkout the code base #
 | 
				
			||||||
        uses: actions/setup-node@v2
 | 
					      ##########################
 | 
				
			||||||
 | 
					      - name: Checkout Code
 | 
				
			||||||
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: ${{ matrix.node-version }}
 | 
					          # Full git history is needed to get a proper list of changed files within `super-linter`
 | 
				
			||||||
          cache: "npm"
 | 
					          fetch-depth: 0
 | 
				
			||||||
      - run: npm run lint
 | 
					
 | 
				
			||||||
 | 
					      ################################
 | 
				
			||||||
 | 
					      # Run Linter against code base #
 | 
				
			||||||
 | 
					      ################################
 | 
				
			||||||
 | 
					      - name: Lint Code Base
 | 
				
			||||||
 | 
					        uses: github/super-linter@v4
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          VALIDATE_ALL_CODEBASE: false
 | 
				
			||||||
 | 
					          DEFAULT_BRANCH: main
 | 
				
			||||||
 | 
					          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Build
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          yarn install
 | 
				
			||||||
 | 
					          yarn lint
 | 
				
			||||||
 | 
					          yarn run build
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user