Skip to content

Commit

Permalink
Merge pull request #3 from creative-commoners/pulls/1.0/yarn
Browse files Browse the repository at this point in the history
FIX Ensure yarn scripts exist before running them
  • Loading branch information
GuySartorelli authored Jul 7, 2022
2 parents 9ba303f + 6b18097 commit afdb0a9
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,21 @@ runs:
yarn install --network-concurrency 1
cd ../../..
fi
yarn run build
echo "Running git diff"
git diff-files --quiet -w --relative=client
git diff --name-status --relative=client
echo "Running yarn test"
yarn run test
echo "Running yarn lint"
yarn run lint
if [[ $(cat package.json | jq -r '.scripts.build') != 'null' ]]; then
echo "Running yarn build"
yarn run build
echo "Running git diff"
git diff-files --quiet -w --relative=client
git diff --name-status --relative=client
fi
if [[ $(cat package.json | jq -r '.scripts.test') != 'null' ]]; then
echo "Running yarn test"
yarn run test
fi
if [[ $(cat package.json | jq -r '.scripts.lint') != 'null' ]]; then
echo "Running yarn lint"
yarn run lint
fi
echo "Passed"
- name: "Run PHP linting"
Expand Down

0 comments on commit afdb0a9

Please sign in to comment.