Skip to content

Commit e434342

Browse files
download from node-versions and fallback to node dist (#147)
* download LTS versions from releases * support upcoiming ghes Co-authored-by: eric sciple <[email protected]>
1 parent 7c6182c commit e434342

20 files changed

+6522
-1314
lines changed

.github/workflows/build-test.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: build-test
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- '**.md'
7+
push:
8+
branches:
9+
- master
10+
- releases/*
11+
paths-ignore:
12+
- '**.md'
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.operating-system }}
17+
strategy:
18+
matrix:
19+
operating-system: [ubuntu-latest, windows-latest]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Setup node 12
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: 12.x
26+
- run: npm ci
27+
- run: npm run build
28+
- run: npm run format-check
29+
- run: npm test
30+
- name: Verify no unstaged changes
31+
if: runner.os != 'windows'
32+
run: __tests__/verify-no-unstaged-changes.sh

.github/workflows/proxy.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: proxy
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- '**.md'
7+
push:
8+
branches:
9+
- master
10+
- releases/*
11+
paths-ignore:
12+
- '**.md'
13+
14+
jobs:
15+
test-proxy:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
container:
20+
image: ubuntu:latest
21+
options: --dns 127.0.0.1
22+
services:
23+
squid-proxy:
24+
image: datadog/squid:latest
25+
ports:
26+
- 3128:3128
27+
env:
28+
https_proxy: http://squid-proxy:3128
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Clear tool cache
32+
run: rm -rf $RUNNER_TOOL_CACHE/*
33+
- name: Setup node 10
34+
uses: ./
35+
with:
36+
node-version: 10.x
37+
- name: Verify node and npm
38+
run: __tests__/verify-node.sh 10
39+
40+
test-bypass-proxy:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
fail-fast: false
44+
env:
45+
https_proxy: http://no-such-proxy:3128
46+
no_proxy: api.github.com,github.com,nodejs.org,registry.npmjs.org,*.s3.amazonaws.com,s3.amazonaws.com
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Clear tool cache
50+
run: rm -rf $RUNNER_TOOL_CACHE/*
51+
- name: Setup node 11
52+
uses: ./
53+
with:
54+
node-version: 11
55+
- name: Verify node and npm
56+
run: __tests__/verify-node.sh 11

.github/workflows/versions.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: versions
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- '**.md'
7+
push:
8+
branches:
9+
- master
10+
- releases/*
11+
paths-ignore:
12+
- '**.md'
13+
14+
jobs:
15+
versions:
16+
runs-on: ${{ matrix.operating-system }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
operating-system: [ubuntu-latest, windows-latest]
21+
defaults:
22+
run:
23+
shell: bash
24+
steps:
25+
- uses: actions/checkout@v2
26+
# test version that falls through to node dist
27+
- name: Setup node 11 from dist
28+
uses: ./
29+
with:
30+
node-version: 11
31+
- name: Verify node and npm
32+
run: __tests__/verify-node.sh 11
33+
# test old versions which didn't have npm and layout different
34+
- name: Setup node 0.12.18 from dist
35+
uses: ./
36+
with:
37+
node-version: 0.12.18
38+
- name: Verify node
39+
shell: bash
40+
run: __tests__/verify-node.sh 0.12.18 SKIP_NPM
41+
# test version from node manifest
42+
- name: Setup node 12.16.2 from manifest
43+
uses: ./
44+
with:
45+
node-version: 12.16.2
46+
- name: Verify node and npm
47+
run: __tests__/verify-node.sh 12

.github/workflows/workflow.yml

-100
This file was deleted.

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ node_modules/
22
lib/
33
__tests__/runner/*
44

5+
validate/temp
6+
validate/node
7+
58
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
69
# Logs
710
logs

.vscode/launch.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug Jest Tests on Nix",
9+
"type": "node",
10+
"request": "launch",
11+
"runtimeArgs": [
12+
"--inspect-brk",
13+
"${workspaceRoot}/node_modules/.bin/jest",
14+
"--runInBand"
15+
],
16+
"console": "integratedTerminal",
17+
"internalConsoleOptions": "neverOpen",
18+
"port": 9229
19+
}
20+
]
21+
}

__tests__/__snapshots__/authutil.test.ts.snap

-31
This file was deleted.

0 commit comments

Comments
 (0)