-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it work on Windows with WSL, MSYS, Cygwin
- Loading branch information
1 parent
10399ed
commit 7f15005
Showing
4 changed files
with
191 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: 'Tests on Windows: `nvm install`' | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
node: | ||
name: 'MSYS fail prefix nvm install' | ||
runs-on: windows-latest | ||
steps: | ||
- name: Retrieve nvm | ||
shell: bash | ||
run: | | ||
mkdir vp "$HOME/.nvm" | ||
curl -sSLo "$HOME/.nvm/nvm.sh" "https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${GITHUB_SHA}/nvm.sh" | ||
source "$HOME/.nvm/nvm.sh" | ||
! nvm install --lts | ||
nodes: | ||
name: 'MSYS nvm install' | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
npm-node-version: | ||
- '--lts' | ||
- '--default 12' | ||
- '--no-progress 10' | ||
|
||
steps: | ||
- name: Retrieve nvm | ||
shell: bash | ||
run: | | ||
mkdir vp "$HOME/.nvm" | ||
curl -sSLo "$HOME/.nvm/nvm.sh" "https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${GITHUB_SHA}/nvm.sh" | ||
source "$HOME/.nvm/nvm.sh" | ||
unset npm_config_prefix | ||
nvm install ${{ matrix.npm-node-version }} | ||
wsl_nodes: | ||
name: 'WSL nvm install' | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
wsl-distrib: | ||
- Debian | ||
- Alpine | ||
- Ubuntu-18.04 | ||
npm-node-version: | ||
- '--lts' | ||
- '11' | ||
steps: | ||
- uses: Vampire/setup-wsl@v1 | ||
with: | ||
distribution: ${{ matrix.wsl-distrib }} | ||
additional-packages: bash curl ca-certificates | ||
- name: Retrieve nvm on WSL | ||
shell: wsl-bash {0} | ||
env: | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
GITHUB_SHA: github.sha | ||
run: | | ||
mkdir -p "$HOME/.nvm" | ||
curl -sSLo "$HOME/.nvm/nvm.sh" "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/nvm.sh" | ||
source "$HOME/.nvm/nvm.sh" | ||
nvm install ${{ matrix.npm-node-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters