Commit 90c448a8 authored by David Kale's avatar David Kale
Browse files

Update packages to support http_proxy

parent 63d68602
Loading
Loading
Loading
Loading
+36
Changes for .github/workflows/workflow.yml: 36 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -24,3 +24,39 @@ jobs:

    - name: npm test
      run: npm test
  run-with-proxy:
    name: Run with proxy
    runs-on: ubuntu-latest
    services:
      squid:
        image: dakale/squid
        ports: ['3128:3128']
        options: '--health-cmd "exit 0" --health-interval 3s'
    env:
      http_proxy: http://localhost:3128
      https_proxy: http://localhost:3128
    steps:
    - name: Block non proxied traffic
      run: |
        echo "127.0.0.0 registry.npm.js nodejs.org github.com api.github.com download.java.net static.azul.com" | sudo tee -a /etc/hosts
    - name: Checkout
      uses: actions/checkout@master

    - name: Set Node.js 10.x
      uses: actions/setup-node@master
      with:
        node-version: 10.x

    - name: npm install
      run: npm install

    - name: Lint
      run: npm run format-check

    - name: npm test
      run: npm test

    - name: Check proxy logs
      run: |
        docker cp ${{ job.services.squid.id }}:/var/log/squid/access.log access.log
        cat access.log

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+897 −1215

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Changes for package.json: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -26,10 +26,10 @@
  "dependencies": {
    "@actions/core": "^1.0.0",
    "@actions/exec": "^1.0.0",
    "@actions/http-client": "^1.0.6",
    "@actions/io": "^1.0.0",
    "@actions/tool-cache": "^1.0.0",
    "semver": "^6.1.1",
    "typed-rest-client": "1.5.0"
    "@actions/tool-cache": "^1.3.1",
    "semver": "^6.1.1"
  },
  "devDependencies": {
    "@types/jest": "^24.0.13",
+1 −1
Changes for src/installer.ts: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -3,11 +3,11 @@ let tempDirectory = process.env['RUNNER_TEMP'] || '';
import * as core from '@actions/core';
import * as io from '@actions/io';
import * as exec from '@actions/exec';
import * as httpm from '@actions/http-client';
import * as tc from '@actions/tool-cache';
import * as fs from 'fs';
import * as path from 'path';
import * as semver from 'semver';
import * as httpm from 'typed-rest-client/HttpClient';

const IS_WINDOWS = process.platform === 'win32';