ci: run style unit tests only if we target develop (#27472)
Some tests assume the base branch is develop, but this branch may not have been checked out.
This commit is contained in:
		 Harmen Stoppels
					Harmen Stoppels
				
			
				
					committed by
					
						 Massimiliano Culpo
						Massimiliano Culpo
					
				
			
			
				
	
			
			
			 Massimiliano Culpo
						Massimiliano Culpo
					
				
			
						parent
						
							c8daa7218d
						
					
				
				
					commit
					654f6839eb
				
			| @@ -14,15 +14,15 @@ | ||||
| # Usage: | ||||
| #     run-flake8-tests | ||||
| # | ||||
| . "$(dirname $0)/setup.sh" | ||||
| . "$(dirname "$0")/setup.sh" | ||||
|  | ||||
| BASE="" | ||||
| if [ -n "$GITHUB_BASE_REF" ]; then | ||||
|     BASE="--base ${GITHUB_BASE_REF}" | ||||
| args=() | ||||
| if [[ -n $GITHUB_BASE_REF ]]; then | ||||
|     args+=("--base" "${GITHUB_BASE_REF}") | ||||
| fi | ||||
|  | ||||
| # verify that the code style is correct | ||||
| spack style --root-relative $BASE | ||||
| spack style --root-relative "${args[@]}" | ||||
|  | ||||
| # verify that the license headers are present | ||||
| spack license verify | ||||
|   | ||||
		Reference in New Issue
	
	Block a user