mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 07:33:34 +00:00 
			
		
		
		
	follow proxy settings
This commit is contained in:
		
							parent
							
								
									9a99bb3e35
								
							
						
					
					
						commit
						64609a2cc7
					
				
							
								
								
									
										40
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							@ -1,19 +1,19 @@
 | 
				
			|||||||
name: Main workflow
 | 
					name: Main workflow
 | 
				
			||||||
on: [push]
 | 
					on: [push]
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  run:
 | 
					  build:
 | 
				
			||||||
    name: Run
 | 
					    name: Build
 | 
				
			||||||
    runs-on: ${{ matrix.operating-system }}
 | 
					    runs-on: ${{ matrix.operating-system }}
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        operating-system: [ubuntu-latest, windows-latest]
 | 
					        operating-system: [ubuntu-latest, windows-latest]
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@master
 | 
					      - uses: actions/checkout@v2
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
    - name: Set Node.js 10.x
 | 
					      - name: Setup node 12
 | 
				
			||||||
      uses: actions/setup-node@master
 | 
					        uses: actions/setup-node@v1
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
        version: 10.x
 | 
					          version: 12.x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: npm install
 | 
					      - name: npm install
 | 
				
			||||||
        run: npm install
 | 
					        run: npm install
 | 
				
			||||||
@ -23,3 +23,31 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      - name: npm test
 | 
					      - name: npm test
 | 
				
			||||||
        run: npm test
 | 
					        run: npm test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  test:
 | 
				
			||||||
 | 
					    name: Test E2E
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Setup node 10
 | 
				
			||||||
 | 
					        uses: ./
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          version: 10.x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Verify node version
 | 
				
			||||||
 | 
					        run: __tests__/verify-node-version.sh 10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  test-proxy:
 | 
				
			||||||
 | 
					    name: Test E2E with proxy
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@users/ericsciple/m165proxy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Setup node 10
 | 
				
			||||||
 | 
					        uses: ./
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          version: 10.x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Verify node version
 | 
				
			||||||
 | 
					        run: __tests__/verify-node-version.sh 10
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										15
									
								
								__tests__/verify-node-version.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								__tests__/verify-node-version.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ -z "$1" ]]; then
 | 
				
			||||||
 | 
					  echo "Must supply version argument"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					node_version="$(node --version)"
 | 
				
			||||||
 | 
					echo "Found node version '$node_version'"
 | 
				
			||||||
 | 
					if [[ $node_version =~ "v$1" ]]; then
 | 
				
			||||||
 | 
					  echo "Success. Version matches 'v$1'"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo "Unexpected version"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user