mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-11-04 01:28:56 +08:00 
			
		
		
		
	Test coverage: Verify local build cache is restored with gradle-user-home
This commit is contained in:
		@@ -9,3 +9,11 @@ repositories {
 | 
			
		||||
dependencies {
 | 
			
		||||
    testImplementation('junit:junit:4.12')
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tasks.named("test").configure {
 | 
			
		||||
    doLast {
 | 
			
		||||
        if (System.properties.verifyCachedBuild) {
 | 
			
		||||
            throw new RuntimeException("Build was not cached: unexpected execution of test task")
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										1
									
								
								__tests__/samples/basic/gradle.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								__tests__/samples/basic/gradle.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
org.gradle.caching=true
 | 
			
		||||
		Reference in New Issue
	
	Block a user