-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 2.0-v1-sync
- Loading branch information
Showing
5 changed files
with
64 additions
and
19 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 |
---|---|---|
|
@@ -30,6 +30,7 @@ jobs: | |
- Node.js 16.x | ||
- Node.js 17.x | ||
- Node.js 18.x | ||
- Node.js 19.x | ||
|
||
include: | ||
- name: Node.js 0.10 | ||
|
@@ -86,27 +87,32 @@ jobs: | |
|
||
- name: Node.js 12.x | ||
node-version: "12.22" | ||
npm-i: [email protected] | ||
|
||
- name: Node.js 13.x | ||
node-version: "13.14" | ||
npm-i: [email protected] | ||
|
||
- name: Node.js 14.x | ||
node-version: "14.19" | ||
node-version: "14.21" | ||
|
||
- name: Node.js 15.x | ||
node-version: "15.14" | ||
|
||
- name: Node.js 16.x | ||
node-version: "16.15" | ||
node-version: "16.19" | ||
|
||
- name: Node.js 17.x | ||
node-version: "17.9" | ||
|
||
- name: Node.js 18.x | ||
node-version: "18.0" | ||
node-version: "18.14" | ||
|
||
- name: Node.js 19.x | ||
node-version: "19.7" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js ${{ matrix.node-version }} | ||
shell: bash -eo pipefail -l {0} | ||
|
@@ -115,7 +121,12 @@ jobs: | |
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" | ||
- name: Configure npm | ||
run: npm config set shrinkwrap false | ||
run: | | ||
if [[ "$(npm config get package-lock)" == "true" ]]; then | ||
npm config set package-lock false | ||
else | ||
npm config set shrinkwrap false | ||
fi | ||
- name: Install npm module(s) ${{ matrix.npm-i }} | ||
run: npm install --save-dev ${{ matrix.npm-i }} | ||
|
@@ -125,8 +136,8 @@ jobs: | |
shell: bash | ||
run: | | ||
# eslint for linting | ||
# - remove on Node.js < 10 | ||
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then | ||
# - remove on Node.js < 12 | ||
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 12 ]]; then | ||
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \ | ||
grep -E '^eslint(-|$)' | \ | ||
sort -r | \ | ||
|
@@ -143,7 +154,7 @@ jobs: | |
echo "node@$(node -v)" | ||
echo "npm@$(npm -v)" | ||
npm -s ls ||: | ||
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }' | ||
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT" | ||
- name: Run tests | ||
shell: bash | ||
|
@@ -168,7 +179,7 @@ jobs: | |
mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}" | ||
fi | ||
- name: Upload code coverage | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
|
||
if: steps.list_env.outputs.nyc != '' | ||
with: | ||
|
@@ -180,14 +191,14 @@ jobs: | |
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install lcov | ||
shell: bash | ||
run: sudo apt-get -y install lcov | ||
|
||
- name: Collect coverage reports | ||
uses: actions/download-artifact@v2 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage | ||
path: ./coverage | ||
|
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
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