mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 05:19:11 +08:00 
			
		
		
		
	Add e2e arch test
This commit is contained in:
		
							
								
								
									
										13
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
								
							@@ -96,4 +96,17 @@ jobs:
 | 
				
			|||||||
          node-version: 0.12.18
 | 
					          node-version: 0.12.18
 | 
				
			||||||
      - name: Verify node
 | 
					      - name: Verify node
 | 
				
			||||||
        run: __tests__/verify-node.sh 0.12.18 SKIP_NPM
 | 
					        run: __tests__/verify-node.sh 0.12.18 SKIP_NPM
 | 
				
			||||||
 | 
					        shell: bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  arch:
 | 
				
			||||||
 | 
					    runs-on: windows-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					      - name: Setup node 12 x86 from dist
 | 
				
			||||||
 | 
					        uses: ./
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          node-version: '12'
 | 
				
			||||||
 | 
					          architecture: 'x86'
 | 
				
			||||||
 | 
					      - name: Verify node
 | 
				
			||||||
 | 
					        run: __tests__/verify-arch.sh "ia32"
 | 
				
			||||||
        shell: bash
 | 
					        shell: bash
 | 
				
			||||||
							
								
								
									
										11
									
								
								__tests__/verify-arch.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								__tests__/verify-arch.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -n "$1" ]; then
 | 
				
			||||||
 | 
					  architecture="$(node -e 'console.log(process.arch)')"
 | 
				
			||||||
 | 
					  if [ -z "$(echo $architecture | grep --fixed-strings $1)" ]; then
 | 
				
			||||||
 | 
					    echo "Unexpected architecture"
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo "Skip testing architecture"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
		Reference in New Issue
	
	Block a user