mirror of
				https://kkgithub.com/actions/setup-node.git
				synced 2025-10-31 10:41:57 +08:00 
			
		
		
		
	follow proxy settings (#105)
This commit is contained in:
		
							
								
								
									
										86
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										86
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,25 +1,81 @@ | ||||
| name: Main workflow | ||||
| on: [push] | ||||
|  | ||||
| on: | ||||
|   pull_request: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|       - releases/* | ||||
|  | ||||
| jobs: | ||||
|   run: | ||||
|     name: Run | ||||
|   build: | ||||
|     runs-on: ${{ matrix.operating-system }} | ||||
|     strategy: | ||||
|       matrix: | ||||
|         operating-system: [ubuntu-latest, windows-latest] | ||||
|     steps: | ||||
|     - uses: actions/checkout@master | ||||
|      | ||||
|     - name: Set Node.js 10.x | ||||
|       uses: actions/setup-node@master | ||||
|       with: | ||||
|         version: 10.x | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Setup node 12 | ||||
|         uses: actions/setup-node@v1 | ||||
|         with: | ||||
|           node-version: 12.x | ||||
|       - run: npm ci | ||||
|       - run: npm run build | ||||
|       - run: npm run format-check | ||||
|       - run: npm run pack | ||||
|       - run: npm test | ||||
|       - name: Verify no unstaged changes | ||||
|         if: runner.os != 'windows' | ||||
|         run: __tests__/verify-no-unstaged-changes.sh | ||||
|  | ||||
|     - name: npm install | ||||
|       run: npm install | ||||
|   test: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Clear tool cache | ||||
|         run: rm -rf $RUNNER_TOOL_CACHE/* | ||||
|       - name: Setup node 10 | ||||
|         uses: ./ | ||||
|         with: | ||||
|           node-version: 10.x | ||||
|       - name: Verify node and npm | ||||
|         run: __tests__/verify-node.sh 10 | ||||
|  | ||||
|     - name: Lint | ||||
|       run: npm run format-check | ||||
|   test-proxy: | ||||
|     runs-on: ubuntu-latest | ||||
|     container: | ||||
|       image: ubuntu:latest | ||||
|       options: --dns 127.0.0.1 | ||||
|     services: | ||||
|       squid-proxy: | ||||
|         image: datadog/squid:latest | ||||
|         ports: | ||||
|           - 3128:3128 | ||||
|     env: | ||||
|       https_proxy: http://squid-proxy:3128 | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Clear tool cache | ||||
|         run: rm -rf $RUNNER_TOOL_CACHE/* | ||||
|       - name: Setup node 10 | ||||
|         uses: ./ | ||||
|         with: | ||||
|           node-version: 10.x | ||||
|       - name: Verify node and npm | ||||
|         run: __tests__/verify-node.sh 10 | ||||
|  | ||||
|     - name: npm test | ||||
|       run: npm test | ||||
|   test-bypass-proxy: | ||||
|     runs-on: ubuntu-latest | ||||
|     env: | ||||
|       https_proxy: http://no-such-proxy:3128 | ||||
|       no_proxy: github.com,nodejs.org,registry.npmjs.org | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Clear tool cache | ||||
|         run: rm -rf $RUNNER_TOOL_CACHE/* | ||||
|       - name: Setup node 10 | ||||
|         uses: ./ | ||||
|         with: | ||||
|           node-version: 10.x | ||||
|       - name: Verify node and npm | ||||
|         run: __tests__/verify-node.sh 10 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 eric sciple
					eric sciple