improve Node.js setup on GitHub Actions
This commit is contained in:
parent
73e6b2550b
commit
13eaf1339a
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
|
@ -36,12 +36,7 @@ jobs:
|
||||||
- name: Perform uglify, build & test
|
- name: Perform uglify, build & test
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git clone --branch v1.6.0 --depth 1 https://github.com/jasongin/nvs.git ~/.nvs
|
./test/release/setup_node.sh
|
||||||
while ! timeout 60 bash -c '. ~/.nvs/nvs.sh add $NODE && nvs use $NODE'; do
|
|
||||||
cd ~/.nvs
|
|
||||||
while !(git clean -xdf); do echo "'git clean' failed - retrying..."; done
|
|
||||||
cd -
|
|
||||||
done
|
|
||||||
. ~/.nvs/nvs.sh --version
|
. ~/.nvs/nvs.sh --version
|
||||||
nvs use $NODE
|
nvs use $NODE
|
||||||
node --version
|
node --version
|
||||||
|
|
|
||||||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -29,12 +29,7 @@ jobs:
|
||||||
- name: Perform tests
|
- name: Perform tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git clone --branch v1.6.0 --depth 1 https://github.com/jasongin/nvs.git ~/.nvs
|
./test/release/setup_node.sh
|
||||||
while ! timeout 60 bash -c '. ~/.nvs/nvs.sh add $NODE && nvs use $NODE'; do
|
|
||||||
cd ~/.nvs
|
|
||||||
while !(git clean -xdf); do echo "'git clean' failed - retrying..."; done
|
|
||||||
cd -
|
|
||||||
done
|
|
||||||
. ~/.nvs/nvs.sh --version
|
. ~/.nvs/nvs.sh --version
|
||||||
nvs use $NODE
|
nvs use $NODE
|
||||||
node --version
|
node --version
|
||||||
|
|
|
||||||
15
.github/workflows/ufuzz.yml
vendored
15
.github/workflows/ufuzz.yml
vendored
|
|
@ -30,23 +30,10 @@ jobs:
|
||||||
NODE: ${{ matrix.node }}
|
NODE: ${{ matrix.node }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install GNU Core Utilities
|
|
||||||
if: ${{ startsWith(matrix.os, 'macos') }}
|
|
||||||
env:
|
|
||||||
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
|
|
||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
while !(brew install coreutils); do echo "'brew install' failed - retrying..."; done
|
|
||||||
- name: Perform fuzzing
|
- name: Perform fuzzing
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git clone --branch v1.6.0 --depth 1 https://github.com/jasongin/nvs.git ~/.nvs
|
./test/release/setup_node.sh
|
||||||
while ! timeout 60 bash -c '. ~/.nvs/nvs.sh add $NODE && nvs use $NODE'; do
|
|
||||||
cd ~/.nvs
|
|
||||||
while !(git clean -xdf); do echo "'git clean' failed - retrying..."; done
|
|
||||||
cd -
|
|
||||||
done
|
|
||||||
. ~/.nvs/nvs.sh --version
|
. ~/.nvs/nvs.sh --version
|
||||||
nvs use $NODE
|
nvs use $NODE
|
||||||
node --version
|
node --version
|
||||||
|
|
|
||||||
21
test/release/setup_node.sh
Executable file
21
test/release/setup_node.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
install() {
|
||||||
|
echo "$PWD> . ~/.nvs/nvs.sh add $NODE && nvs use $NODE"
|
||||||
|
(. ~/.nvs/nvs.sh add $NODE && nvs use $NODE) &
|
||||||
|
PID=$!
|
||||||
|
(sleep 60; pkill -P $PID; kill $PID &> /dev/null) &
|
||||||
|
WID=$!
|
||||||
|
wait $PID &> /dev/null
|
||||||
|
CODE=$?
|
||||||
|
kill $WID &> /dev/null
|
||||||
|
echo RETURNED $CODE
|
||||||
|
return $CODE
|
||||||
|
}
|
||||||
|
|
||||||
|
git clone --branch v1.6.0 --depth 1 https://github.com/jasongin/nvs.git ~/.nvs
|
||||||
|
while ! install; do
|
||||||
|
cd ~/.nvs
|
||||||
|
while !(git clean -xdf); do echo "'git clean' failed - retrying..."; done
|
||||||
|
cd -
|
||||||
|
done
|
||||||
Loading…
Reference in New Issue
Block a user