mirror of
				https://github.com/actions/checkout.git
				synced 2025-11-01 02:28:40 +08:00 
			
		
		
		
	feat: updated test to make all checks in only one check
This commit is contained in:
		
							parent
							
								
									18e5a0dd62
								
							
						
					
					
						commit
						e12b86ed41
					
				
							
								
								
									
										14
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							|  | @ -113,22 +113,14 @@ jobs: | ||||||
|       - name: Verify submodules recursive |       - name: Verify submodules recursive | ||||||
|         run: __test__/verify-submodules-recursive.sh |         run: __test__/verify-submodules-recursive.sh | ||||||
| 
 | 
 | ||||||
|       # Sparse checkout basic example |      # Sparse checkout | ||||||
|       - name: Sparse checkout basic example |       - name: Sparse checkout | ||||||
|         uses: ./ |  | ||||||
|         with: |  | ||||||
|           sparse-checkout: __test__ |  | ||||||
|       - name: Verify sparse checkout basic |  | ||||||
|         run: __test__/verify-sparse-checkout-basic.sh |  | ||||||
| 
 |  | ||||||
|      # Sparse checkout example |  | ||||||
|       - name: Sparse checkout example |  | ||||||
|         uses: ./ |         uses: ./ | ||||||
|         with: |         with: | ||||||
|           sparse-checkout: | |           sparse-checkout: | | ||||||
|             __test__ |             __test__ | ||||||
|             .github |             .github | ||||||
|             src |             dist | ||||||
|       - name: Verify sparse checkout basic |       - name: Verify sparse checkout basic | ||||||
|         run: __test__/verify-sparse-checkout-basic.sh |         run: __test__/verify-sparse-checkout-basic.sh | ||||||
|       - name: Verify sparse checkout example |       - name: Verify sparse checkout example | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
| for pattern in $(git ls-tree --name-only HEAD) | for pattern in $(git ls-tree --name-only HEAD) | ||||||
| do | do | ||||||
|   if [ -d "$pattern" ]; then |   if [ -d "$pattern" ]; then | ||||||
|     if [[ "$pattern" != "__test__" && "$pattern" != ".github" && "$pattern" != "src" ]]; then |     if [[ "$pattern" != "__test__" && "$pattern" != ".github" && "$pattern" != "dist" ]]; then | ||||||
|       echo "Expected directory '$pattern' to not exist" |       echo "Expected directory '$pattern' to not exist" | ||||||
|       exit 1 |       exit 1 | ||||||
|     fi |     fi | ||||||
|  | @ -39,13 +39,13 @@ do | ||||||
|   fi |   fi | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
| # Check that src and its childrens has been fetched correctly | # Check that dist and its childrens has been fetched correctly | ||||||
| if [ ! -d "./src" ]; then | if [ ! -d "./dist" ]; then | ||||||
|   echo "Expected directory 'src' to exist" |   echo "Expected directory 'dist' to exist" | ||||||
|   exit 1 |   exit 1 | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| for file in $(git ls-tree -r --name-only HEAD src) | for file in $(git ls-tree -r --name-only HEAD dist) | ||||||
| do | do | ||||||
|   if [ ! -f "$file" ]; then |   if [ ! -f "$file" ]; then | ||||||
|     echo "Expected file '$file' to exist" |     echo "Expected file '$file' to exist" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel
						Daniel