Bump lodash from 4.17.19 to 4.17.23 #192
This file contains hidden or 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: JS Unit Tests | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| pull_request: | |
| branches: | |
| - develop | |
| jobs: | |
| unit-test-js: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - run: node --version | |
| - name: Check if run is needed | |
| run: | | |
| URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${{ github.event.pull_request.number }}/files?per_page=100" | |
| FILES=$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s -X GET -G $URL | jq -r '.[] | .filename') | |
| echo "Checking Files: $FILES" | |
| REGEX="\.js\|\.jsx\|\.ts\|\.tsx" | |
| if echo $FILES | grep -q $REGEX; then | |
| echo "Detected JavaScript changes. Running tests!" | |
| echo "Changed Files:" | |
| echo $FILES | grep $REGEX | |
| echo "::set-env name=RUN_TESTS::1" | |
| else | |
| echo "No JavaScript changed detected. Skipping tests." | |
| echo "::set-env name=RUN_TESTS::0" | |
| fi | |
| - name: Cache node_modules/ | |
| if: env.RUN_TESTS == 1 | |
| uses: actions/cache@v1 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.OS }}-yarn-cache- | |
| - run: yarn --frozen-lockfile | |
| if: env.RUN_TESTS == 1 | |
| - run: yarn test | |
| if: env.RUN_TESTS == 1 | |
| env: | |
| CI: true |