fix: throw error when required options is missing #672
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: Test validation | |
on: | |
pull_request: | |
types: | |
- edited | |
- labeled | |
- synchronize | |
- ready_for_review | |
- review_requested | |
- reopened | |
jobs: | |
test-validation: | |
if: contains(toJson(github.event.pull_request.labels), 'validation') | |
runs-on: ubuntu-latest | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
steps: | |
- uses: actions/[email protected] | |
- name: yarn install and test validation | |
run: | | |
yarn install --frozen-lockfile | |
VALIDATION=$(echo $PR_TITLE | sed -e 's/.*\[\(.*\)\].*/\1/') | |
if [ -n "$VALIDATION" ]; then | |
yarn test:validation --validation=$VALIDATION | |
fi |