Update README.md #99
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
name: Serverless CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
checkout-install-lint-test-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [13.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup environment | |
uses: actions/setup-node@v2-beta | |
with: | |
node-version: "13" | |
- name: install-lint-test-build | |
run: | | |
array=() | |
find . -name "serverless.yml" -not -path "**/node_modules/**" -print0 >tmpfile | |
while IFS= read -r -d $'\0'; do | |
array+=("$REPLY") | |
done <tmpfile | |
rm -f tmpfile | |
root_directory=$(pwd) | |
for i in "${array[@]}" | |
do | |
: | |
directory=$(echo "$i" | sed -e "s/serverless.yml//") | |
cd "$directory" && \ | |
echo "directory: $directory" | |
yarn install && \ | |
(yarn run --if-present lint:eslint || true) && \ | |
(yarn run --if-present test || true) && \ | |
yarn run build && \ | |
cd "$root_directory" || exit | |
done |