-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (85 loc) · 3.06 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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
- name: Upload `Autosizer` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: Autosizer
files: ./packages/autosizer/coverage/coverage-final.json
- name: Upload `useDebounce` coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: useDebounce
files: ./packages/use-debounce/coverage/coverage-final.json