-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update minor deps * build: remove uuid and use Node.js built-in crypto.randomUUID, update to Node 20
- Loading branch information
1 parent
8ce9bdb
commit e56aaea
Showing
6 changed files
with
133 additions
and
153 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 |
---|---|---|
@@ -1,55 +1,54 @@ | ||
name: Build Project | ||
on: | ||
push: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
node-version: '16' | ||
- name: Run Script | ||
shell: bash | ||
run: | | ||
set -x | ||
npm ci # install packages | ||
NODE_OUTPUT=`node scripts/aggregate-json.mjs 2>&1` | ||
if [[ ! $NODE_OUTPUT ]];then | ||
exit 0 | ||
fi | ||
NODE_OUTPUT="<pre>${NODE_OUTPUT//$'\n'/<br />}</pre>" | ||
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') | ||
if [[ ! $PR_NUMBER ]]; then | ||
exit 0 | ||
fi | ||
jq -n --arg body "$(echo $NODE_OUTPUT)" '{ body: $body }' |\ | ||
curl -sL -X POST -d @- \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
"https://github.com/gitapi/repos/${{ github.repository }}/commits/$GITHUB_SHA/comments" | ||
- name: Build Project | ||
run: | | ||
CI=false npm run build | ||
- name: Publish | ||
uses: JamesIves/github-pages-deploy-action@3.7.1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: build | ||
CLEAN: true | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
node-version: '20' | ||
- name: Run Script | ||
shell: bash | ||
run: | | ||
set -x | ||
npm ci # install packages | ||
NODE_OUTPUT=`node scripts/aggregate-json.mjs 2>&1` | ||
if [[ ! $NODE_OUTPUT ]];then | ||
exit 0 | ||
fi | ||
NODE_OUTPUT="<pre>${NODE_OUTPUT//$'\n'/<br />}</pre>" | ||
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') | ||
if [[ ! $PR_NUMBER ]]; then | ||
exit 0 | ||
fi | ||
jq -n --arg body "$(echo $NODE_OUTPUT)" '{ body: $body }' |\ | ||
curl -sL -X POST -d @- \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
"https://github.com/gitapi/repos/${{ github.repository }}/commits/$GITHUB_SHA/comments" | ||
- name: Build Project | ||
run: | | ||
CI=false npm run build | ||
- name: Publish | ||
uses: JamesIves/github-pages-deploy-action@3.7.1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: build | ||
CLEAN: true |
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16, 18] | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Use cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm test | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18, 20] | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Use cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm test |
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 |
---|---|---|
@@ -1 +1 @@ | ||
v18.17.1 | ||
v20.15.0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.