mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-11 06:41:50 +00:00
do not merge: delete actions temporarily
This commit is contained in:
parent
4da01f4dc4
commit
d9157e8ef8
76
.github/workflows/latest-npm.yml
vendored
76
.github/workflows/latest-npm.yml
vendored
@ -1,76 +0,0 @@
|
|||||||
name: 'Tests: `nvm install-latest-npm`'
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
latest: ${{ steps.set-matrix.outputs.requireds }}
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
iojs.org:443
|
|
||||||
nodejs.org:443
|
|
||||||
- uses: ljharb/actions/node/matrix@main
|
|
||||||
id: set-matrix
|
|
||||||
with:
|
|
||||||
versionsAsRoot: true
|
|
||||||
type: majors
|
|
||||||
preset: '>=1'
|
|
||||||
|
|
||||||
nodes:
|
|
||||||
needs: [matrix]
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
name: 'nvm install-latest-npm'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
|
|
||||||
include:
|
|
||||||
- node-version: "9.2"
|
|
||||||
- node-version: "9.1"
|
|
||||||
- node-version: "9.0"
|
|
||||||
- node-version: "6.1"
|
|
||||||
- node-version: "5.9"
|
|
||||||
- node-version: "4.6"
|
|
||||||
- node-version: "4.5"
|
|
||||||
- node-version: "4.4"
|
|
||||||
- node-version: "0.12"
|
|
||||||
- node-version: "0.10"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
github.com:443
|
|
||||||
iojs.org:443
|
|
||||||
nodejs.org:443
|
|
||||||
registry.npmjs.org:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: ljharb/actions/node/install@main
|
|
||||||
name: 'nvm install-latest-npm'
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
skip-ls-check: true
|
|
||||||
skip-install: true
|
|
||||||
- run: npm --version
|
|
||||||
|
|
||||||
node:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
name: 'nvm install-latest-npm'
|
|
||||||
needs: [nodes]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
egress-policy: block
|
|
||||||
- run: 'echo tests completed'
|
|
73
.github/workflows/lint.yml
vendored
73
.github/workflows/lint.yml
vendored
@ -1,73 +0,0 @@
|
|||||||
name: 'Tests: linting'
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
eclint:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
github.com:443
|
|
||||||
nodejs.org:443
|
|
||||||
registry.npmjs.org:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: ljharb/actions/node/install@main
|
|
||||||
name: 'nvm install ${{ matrix.node-version }} && npm install'
|
|
||||||
with:
|
|
||||||
node-version: 'lts/*'
|
|
||||||
- run: npm run eclint
|
|
||||||
|
|
||||||
dockerfile_lint:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
ghcr.io:443
|
|
||||||
github.com:443
|
|
||||||
pkg-containers.githubusercontent.com:443
|
|
||||||
nodejs.org:443
|
|
||||||
registry.npmjs.org:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: ljharb/actions/node/install@main
|
|
||||||
name: 'nvm install ${{ matrix.node-version }} && npm install'
|
|
||||||
with:
|
|
||||||
node-version: 'lts/*'
|
|
||||||
- run: npm run dockerfile_lint
|
|
||||||
|
|
||||||
doctoc:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
github.com:443
|
|
||||||
nodejs.org:443
|
|
||||||
registry.npmjs.org:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: ljharb/actions/node/install@main
|
|
||||||
name: 'nvm install ${{ matrix.node-version }} && npm install'
|
|
||||||
with:
|
|
||||||
node-version: 'lts/*'
|
|
||||||
- run: npm run doctoc:check
|
|
||||||
|
|
||||||
test_naming:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
github.com:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: check tests filenames
|
|
||||||
run: ./rename_test.sh --check
|
|
23
.github/workflows/rebase.yml
vendored
23
.github/workflows/rebase.yml
vendored
@ -1,23 +0,0 @@
|
|||||||
name: Automatic Rebase
|
|
||||||
|
|
||||||
on: [pull_request_target]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
_:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
name: "Automatic Rebase"
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
api.github.com:443
|
|
||||||
github.com:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: ljharb/rebase@master
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
@ -1,32 +0,0 @@
|
|||||||
name: 'Tests: release process'
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
github.com:443
|
|
||||||
registry.npmjs.org:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "14"
|
|
||||||
- run: npm install
|
|
||||||
- name: Configure git
|
|
||||||
run: |
|
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git fetch --unshallow --tags -f || git fetch --tags -f
|
|
||||||
- name: Attempt `make release` process
|
|
||||||
run: echo proceed | make TAG=99.99.99 release
|
|
||||||
env:
|
|
||||||
GIT_EDITOR: "sed -i '1 s/^/99.99.99 make release test/'"
|
|
||||||
- name: Ensure tag is created
|
|
||||||
run: git tag | grep v99.99.99
|
|
21
.github/workflows/require-allow-edits.yml
vendored
21
.github/workflows/require-allow-edits.yml
vendored
@ -1,21 +0,0 @@
|
|||||||
name: Require “Allow Edits”
|
|
||||||
|
|
||||||
on: [pull_request_target]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
_:
|
|
||||||
permissions:
|
|
||||||
pull-requests: read
|
|
||||||
name: "Require “Allow Edits”"
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
api.github.com:443
|
|
||||||
- uses: ljharb/require-allow-edits@main
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
58
.github/workflows/shellcheck.yml
vendored
58
.github/workflows/shellcheck.yml
vendored
@ -1,58 +0,0 @@
|
|||||||
name: 'Tests: shellcheck'
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
shellcheck_matrix:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
shell:
|
|
||||||
- bash
|
|
||||||
- sh
|
|
||||||
- dash
|
|
||||||
- ksh
|
|
||||||
file:
|
|
||||||
- nvm.sh
|
|
||||||
include:
|
|
||||||
- shell: bash
|
|
||||||
file: install.sh # only supported on bash
|
|
||||||
- shell: bash
|
|
||||||
file: bash_completion # only needed in bash/zsh
|
|
||||||
- shell: bash
|
|
||||||
file: nvm-exec # only runs in bash
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
ghcr.io:443
|
|
||||||
github.com:443
|
|
||||||
pkg-containers.githubusercontent.com:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set up Homebrew
|
|
||||||
uses: Homebrew/actions/setup-homebrew@master
|
|
||||||
- name: Install latest shellcheck
|
|
||||||
run: brew install shellcheck
|
|
||||||
env:
|
|
||||||
HOMEBREW_NO_ANALYTICS: 1
|
|
||||||
- run: which shellcheck
|
|
||||||
- run: shellcheck --version
|
|
||||||
- name: Run shellcheck on ${{ matrix.file }}
|
|
||||||
run: shellcheck -s ${{ matrix.shell }} ${{ matrix.file }}
|
|
||||||
|
|
||||||
shellcheck:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
needs: [shellcheck_matrix]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
egress-policy: block
|
|
||||||
- run: 'echo tests completed'
|
|
37
.github/workflows/toc.yml
vendored
37
.github/workflows/toc.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: update readme TOC
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
_:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
name: "update readme TOC"
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v1
|
|
||||||
with:
|
|
||||||
allowed-endpoints:
|
|
||||||
github.com:443
|
|
||||||
registry.npmjs.org:443
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
# https://github.com/actions/checkout/issues/217#issue-599945005
|
|
||||||
# pulls all commits (needed for lerna / semantic release to correctly version)
|
|
||||||
fetch-depth: "0"
|
|
||||||
|
|
||||||
# pulls all tags (needed for lerna / semantic release to correctly version)
|
|
||||||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '16'
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run doctoc
|
|
||||||
- name: commit changes
|
|
||||||
uses: ljharb/actions-js-build/commit@v3+amendpush
|
|
||||||
with:
|
|
||||||
amend: true
|
|
||||||
force: true
|
|
133
.github/workflows/windows-npm.yml
vendored
133
.github/workflows/windows-npm.yml
vendored
@ -1,133 +0,0 @@
|
|||||||
name: 'Tests on Windows: `nvm install`'
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
env:
|
|
||||||
NVM_INSTALL_GITHUB_REPO: ${{ github.repository }}
|
|
||||||
NVM_INSTALL_VERSION: ${{ github.sha }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
msys_fail_install:
|
|
||||||
# Default installation does not work due to npm_config_prefix set to C:\npm\prefix
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
name: 'MSYS fail prefix nvm install'
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Retrieve nvm
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD=script bash
|
|
||||||
. "$HOME/.nvm/nvm.sh"
|
|
||||||
! nvm install --lts
|
|
||||||
|
|
||||||
msys_matrix:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
name: 'MSYS nvm install'
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
npm-node-version:
|
|
||||||
- '--lts'
|
|
||||||
- '--default 12'
|
|
||||||
- '--no-progress 10'
|
|
||||||
steps:
|
|
||||||
- name: Retrieve nvm
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
unset npm_config_prefix
|
|
||||||
if [ "${{ matrix.npm-node-version }}" = "--lts" ]; then
|
|
||||||
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | bash
|
|
||||||
else
|
|
||||||
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD=script bash
|
|
||||||
fi
|
|
||||||
. "$HOME/.nvm/nvm.sh"
|
|
||||||
nvm install ${{ matrix.npm-node-version }}
|
|
||||||
|
|
||||||
cygwin_matrix:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
name: 'Cygwin nvm install'
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Install Cygwin
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
export SITE='https://mirror.clarkson.edu/cygwin/'
|
|
||||||
export LOCALDIR="$(pwd)"
|
|
||||||
export ROOTDIR="$USERPROFILE\\cygwin"
|
|
||||||
export PACKAGES='bash,git,curl'
|
|
||||||
|
|
||||||
curl -fsSLo setup-x86_64.exe 'https://cygwin.com/setup-x86_64.exe'
|
|
||||||
./setup-x86_64.exe --disable-buggy-antivirus -q -s "$SITE" -l "$LOCALDIR" -R "$ROOTDIR" -P "$PACKAGES"
|
|
||||||
|
|
||||||
cat >~/setup.sh <<EOM
|
|
||||||
unset npm_config_prefix
|
|
||||||
export NVM_INSTALL_GITHUB_REPO="$NVM_INSTALL_GITHUB_REPO"
|
|
||||||
export NVM_INSTALL_VERSION="$NVM_INSTALL_VERSION"
|
|
||||||
|
|
||||||
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | bash
|
|
||||||
. "$HOME/.nvm/nvm.sh"
|
|
||||||
nvm install --lts
|
|
||||||
|
|
||||||
nvm deactivate
|
|
||||||
rm -rf "$HOME/.nvm/nvm.sh"
|
|
||||||
|
|
||||||
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD=script bash
|
|
||||||
. "$HOME/.nvm/nvm.sh"
|
|
||||||
nvm install 9
|
|
||||||
EOM
|
|
||||||
- name: Retrieve nvm
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
cd %USERPROFILE%\cygwin\bin
|
|
||||||
bash.exe "%USERPROFILE%\setup.sh"
|
|
||||||
|
|
||||||
wsl_matrix:
|
|
||||||
name: 'WSL nvm install'
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: wsl-bash {0}
|
|
||||||
runs-on: windows-latest
|
|
||||||
env:
|
|
||||||
WSLENV: NVM_INSTALL_GITHUB_REPO:NVM_INSTALL_VERSION:/p
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
wsl-distrib:
|
|
||||||
- Debian
|
|
||||||
- Alpine
|
|
||||||
- Ubuntu-18.04
|
|
||||||
npm-node-version:
|
|
||||||
- '--lts'
|
|
||||||
- '14'
|
|
||||||
- '12'
|
|
||||||
- '11'
|
|
||||||
- '10'
|
|
||||||
method:
|
|
||||||
- ''
|
|
||||||
- 'script'
|
|
||||||
steps:
|
|
||||||
- uses: Vampire/setup-wsl@v1
|
|
||||||
with:
|
|
||||||
distribution: ${{ matrix.wsl-distrib }}
|
|
||||||
additional-packages: bash git curl ca-certificates wget
|
|
||||||
- name: Retrieve nvm on WSL
|
|
||||||
run: |
|
|
||||||
if [ -z "${{ matrix.method }}" ]; then
|
|
||||||
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | bash
|
|
||||||
else
|
|
||||||
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD="${{matrix.method}}" bash
|
|
||||||
fi
|
|
||||||
. "$HOME/.nvm/nvm.sh"
|
|
||||||
nvm install ${{ matrix.npm-node-version }}
|
|
||||||
|
|
||||||
nvm_windows:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
needs: [wsl_matrix, cygwin_matrix, msys_matrix, msys_fail_install]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- run: 'echo tests completed'
|
|
Loading…
Reference in New Issue
Block a user