Skip to content

Commit

Permalink
download from node-versions and fallback to node dist (#147)
Browse files Browse the repository at this point in the history
* download LTS versions from releases

* support upcoiming ghes 

Co-authored-by: eric sciple <ericsciple@users.noreply.github.com>
  • Loading branch information
bryanmacfarlane and ericsciple authored May 19, 2020
1 parent 7c6182c commit e434342
Show file tree
Hide file tree
Showing 20 changed files with 6,522 additions and 1,314 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 56 additions & 0 deletions .github/workflows/proxy.yml
Original file line number Diff line number Diff line change
@@ -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: api.github.com,github.com,nodejs.org,registry.npmjs.org,*.s3.amazonaws.com,s3.amazonaws.com
steps:
- uses: actions/checkout@v2
- name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup node 11
uses: ./
with:
node-version: 11
- name: Verify node and npm
run: __tests__/verify-node.sh 11
47 changes: 47 additions & 0 deletions .github/workflows/versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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 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
# test old versions which didn't have npm and layout different
- 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
# test version from node manifest
- name: Setup node 12.16.2 from manifest
uses: ./
with:
node-version: 12.16.2
- name: Verify node and npm
run: __tests__/verify-node.sh 12
100 changes: 0 additions & 100 deletions .github/workflows/workflow.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ node_modules/
lib/
__tests__/runner/*

validate/temp
validate/node

# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
Expand Down
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Jest Tests on Nix",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
}
]
}
31 changes: 0 additions & 31 deletions __tests__/__snapshots__/authutil.test.ts.snap

This file was deleted.

Loading

0 comments on commit e434342

Please sign in to comment.