mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 13:29:12 +08:00 
			
		
		
		
	update workflows
This commit is contained in:
		
							
								
								
									
										32
									
								
								.github/workflows/build-test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								.github/workflows/build-test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
name: build-test
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'    
 | 
			
		||||
  push:    
 | 
			
		||||
    branches:
 | 
			
		||||
      - master
 | 
			
		||||
      - releases/*
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'
 | 
			
		||||
      
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: ${{ matrix.operating-system }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        operating-system: [ubuntu-latest, windows-latest]
 | 
			
		||||
    steps:
 | 
			
		||||
      - 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 test
 | 
			
		||||
      - name: Verify no unstaged changes
 | 
			
		||||
        if: runner.os != 'windows'
 | 
			
		||||
        run: __tests__/verify-no-unstaged-changes.sh
 | 
			
		||||
							
								
								
									
										56
									
								
								.github/workflows/proxy.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								.github/workflows/proxy.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
			
		||||
name: proxy
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'    
 | 
			
		||||
  push:    
 | 
			
		||||
    branches:
 | 
			
		||||
      - master
 | 
			
		||||
      - releases/*
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'
 | 
			
		||||
      
 | 
			
		||||
jobs:
 | 
			
		||||
  test-proxy:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    strategy:    
 | 
			
		||||
      fail-fast: false    
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
  test-bypass-proxy:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    strategy:    
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
    env:
 | 
			
		||||
      https_proxy: http://no-such-proxy:3128
 | 
			
		||||
      no_proxy: github.com,nodejs.org,registry.npmjs.org,*.s3.amazonaws.com
 | 
			
		||||
    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
 | 
			
		||||
							
								
								
									
										46
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
name: versions
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'    
 | 
			
		||||
  push:    
 | 
			
		||||
    branches:
 | 
			
		||||
      - master
 | 
			
		||||
      - releases/*
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'
 | 
			
		||||
      
 | 
			
		||||
jobs:
 | 
			
		||||
  versions:
 | 
			
		||||
    runs-on: ${{ matrix.operating-system }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix:
 | 
			
		||||
        operating-system: [ubuntu-latest, windows-latest]
 | 
			
		||||
    defaults:
 | 
			
		||||
      run:
 | 
			
		||||
        shell: bash
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      # test version from node manifest
 | 
			
		||||
      - name: Setup node 12 from manifest
 | 
			
		||||
        uses: ./
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 12
 | 
			
		||||
      - name: Verify node and npm
 | 
			
		||||
        run: __tests__/verify-node.sh 12
 | 
			
		||||
      # test version that falls through to node dist
 | 
			
		||||
      - name: Setup node 11 from dist
 | 
			
		||||
        uses: ./
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 11
 | 
			
		||||
      - name: Verify node and npm
 | 
			
		||||
        run: __tests__/verify-node.sh 11
 | 
			
		||||
      - name: Setup node 0.12.18 from dist
 | 
			
		||||
        uses: ./                 
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 0.12.18
 | 
			
		||||
      - name: Verify node
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: __tests__/verify-node.sh 0.12.18 SKIP_NPM      
 | 
			
		||||
							
								
								
									
										100
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										100
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,100 +0,0 @@
 | 
			
		||||
name: Main workflow
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - master
 | 
			
		||||
      - releases/*
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: ${{ matrix.operating-system }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        operating-system: [ubuntu-latest, windows-latest]
 | 
			
		||||
    steps:
 | 
			
		||||
      - 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 test
 | 
			
		||||
      - name: Verify no unstaged changes
 | 
			
		||||
        if: runner.os != 'windows'
 | 
			
		||||
        run: __tests__/verify-no-unstaged-changes.sh
 | 
			
		||||
 | 
			
		||||
  test:
 | 
			
		||||
    runs-on: ${{ matrix.operating-system }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        operating-system: [ubuntu-latest, windows-latest]
 | 
			
		||||
    defaults:
 | 
			
		||||
      run:
 | 
			
		||||
        shell: bash
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
  test-fallback:
 | 
			
		||||
    runs-on: windows-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - name: Clear tool cache
 | 
			
		||||
        run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
 | 
			
		||||
      - name: Setup node 0.12.18 # For non LTS versions of Node, the zip is not always available
 | 
			
		||||
        uses: ./                 # and falls back to downloading node.exe and node.lib
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 0.12.18
 | 
			
		||||
      - name: Verify node
 | 
			
		||||
        shell: bash
 | 
			
		||||
        run: __tests__/verify-node.sh 0.12.18 SKIP_NPM
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
  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