Update packages to support http_proxy

This commit is contained in:
David Kale 2020-02-06 15:16:41 -05:00
parent 63d68602dd
commit 90c448a85d
5 changed files with 945 additions and 1227 deletions

View file

@ -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

BIN
dist/index.js generated vendored

Binary file not shown.

2128
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -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",

View file

@ -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';