Skip to content

Merge pull request #98 from trinhthinh388/feat/update-use-toggle-api #222

Merge pull request #98 from trinhthinh388/feat/update-use-toggle-api

Merge pull request #98 from trinhthinh388/feat/update-use-toggle-api #222

Workflow file for this run

name: Test
on:
pull_request:
branches:
- 'master'
- 'release'
push:
branches:
- 'master'
- 'release'
permissions:
actions: write
contents: read
jobs:
unit-tests:
name: ʦ Vitest
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18.17.x
- name: 📥 Download deps
run: yarn install --frozen-lockfile
- name: 🔎 Unit Test
run: yarn test
- name: Upload `PhoneInput` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: PhoneInput
files: ./packages/phone-input/coverage/coverage-final.json
# Hooks
- name: Upload `useClickOutside` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: useClickOutside
files: ./packages/use-click-outside/coverage/coverage-final.json
- name: Upload `usePreserveInputCaretPosition` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: usePreserveInputCaretPosition
files: ./packages/use-preserve-input-caret-position/coverage/coverage-final.json
- name: Upload `usePrevious` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: usePrevious
files: ./packages/use-previous/coverage/coverage-final.json
- name: Upload `useSelectionRange` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: useSelectionRange
files: ./packages/use-selection-range/coverage/coverage-final.json
- name: Upload `useToggle` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: useToggle
files: ./packages/use-toggle/coverage/coverage-final.json
- name: Upload `useBreakpoint` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: useBreakpoint
files: ./packages/use-breakpoint/coverage/coverage-final.json