Merge pull request #46 from dakale/http-proxy-support

http proxy support
This commit is contained in:
Konrad Pabjan 2020-02-11 15:48:53 -05:00 committed by GitHub
commit 623089a937
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 940 additions and 1227 deletions

View File

@ -24,3 +24,34 @@ 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

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