chore(deps): update dependency eslint-plugin-storybook to v0.11.2 #6151
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: Unit Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x, 16.x] | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/[email protected] | |
with: | |
persist-credentials: false | |
- name: Cache node modules 🗄 | |
id: yarn-cache-dir-path | |
run: | | |
echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
${{ runner.os }}- | |
- name: Install 🔧 | |
run: yarn --prefer-offline | |
- name: TypeCheck 📝 | |
run: yarn typecheck | |
- name: Unit Testing 🚥 | |
run: yarn test | |
- name: Report Codecov 🔍 | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
- name: if fail 📌 | |
uses: actions/[email protected] | |
with: | |
github-token: ${{github.token}} | |
script: | | |
const ref = "${{github.ref}}" | |
const pull_number = Number(ref.split("/")[2]) | |
await github.pulls.createReview({ | |
...context.repo, | |
pull_number, | |
body: "Testing failed", | |
event: "REQUEST_CHANGES" | |
}) | |
if: failure() |