chore(deps): update dependency typescript to v4.9.5 #416
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: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x, 16.x] | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | |
with: | |
persist-credentials: false | |
- name: Cache node modules 🗄 | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ env.cache-name }}- | |
${{ runner.OS }}-build- | |
${{ runner.OS }}- | |
- name: Install 🔧 | |
run: | | |
npm install | |
- name: TypeCheck 📝 | |
run: | | |
npm run typecheck | |
- name: Unit Testing 🚥 | |
run: | | |
npm test | |
- name: Report Codecov 🔍 | |
uses: codecov/codecov-action@v2 | |
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/github-script@v6.0.0 | |
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:"Check your code... 🙏🙏", | |
event: "REQUEST_CHANGES" | |
}) | |
if: failure() |