chore(web3): use github actions (#19816)

* chore: use github actions

* chore: npm audit

* chore: fix prettier warn

* chore: fix doc errors

* chore: add puppeteer
This commit is contained in:
Justin Starry
2021-09-13 16:37:18 -05:00
committed by GitHub
parent e1a038e791
commit 1942d294e9
9 changed files with 554 additions and 504 deletions

32
web3.js/commitlint.sh Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env bash
#
# Runs commitlint in the provided subdirectory
#
set -e
basedir=$1
if [[ -z "$basedir" ]]; then
basedir=.
fi
if [[ ! -d "$basedir" ]]; then
echo "Error: not a directory: $basedir"
exit 1
fi
if [[ ! -f "$basedir"/commitlint.config.js ]]; then
echo "Error: No commitlint configuration found"
exit 1
fi
if [[ -z $COMMIT_RANGE ]]; then
echo "Error: COMMIT_RANGE not defined"
exit 1
fi
cd "$basedir"
echo "Checking commits in COMMIT_RANGE: $COMMIT_RANGE"
while IFS= read -r line; do
echo "$line" | npx commitlint
done < <(git log "$COMMIT_RANGE" --format=%s -- .)