Skip to content

Commit 7bd618d

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/babel/runtime-7.26.10
2 parents 73dad7a + 8c3b4de commit 7bd618d

File tree

7 files changed

+98
-99
lines changed

7 files changed

+98
-99
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/verify.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Verify PR changes
5+
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
10+
on:
11+
pull_request:
12+
branches: ['main']
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
node-version: [20.x, 22.x]
22+
package: [use-long-press, use-double-tap, react-interval-hook]
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-tags: 'true'
29+
fetch-depth: '0'
30+
31+
- name: Enable Corepack
32+
run: corepack enable
33+
34+
- name: Install Node.js v${{ matrix.node-version }}
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
registry-url: 'https://registry.npmjs.org/'
39+
cache: 'yarn'
40+
cache-dependency-path: 'yarn.lock'
41+
42+
- name: Install dependencies
43+
run: yarn install --immutable
44+
45+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
46+
run: npm audit signatures
47+
48+
- name: Lint all packages
49+
run: yarn lint
50+
51+
- name: Type check all packages
52+
run: yarn typecheck
53+
54+
- name: Test all packages with coverage
55+
run: yarn test:coverage
56+
57+
- name: Report coverage for ${{ matrix.package }}
58+
uses: davelosert/vitest-coverage-report-action@4921c44721dd660c957e91843f00e1f837ab4375
59+
with:
60+
name: ${{ matrix.package }} coverage report
61+
working-directory: packages/${{ matrix.package }}
62+
json-summary-path: ../../coverage/packages/${{ matrix.package }}/coverage-summary.json
63+
json-final-path: ../../coverage/packages/${{ matrix.package }}/coverage-final.json
64+
65+
66+
# - name: Upload use-long-press coverage reports to Codecov
67+
# uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3
68+
# with:
69+
# token: ${{ secrets.CODECOV_TOKEN }}
70+
# directory: ./coverage/packages/use-long-press
71+
# flags: hooks,use-long-press
72+
#
73+
# - name: Upload use-double-tap coverage reports to Codecov
74+
# uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3
75+
# with:
76+
# token: ${{ secrets.CODECOV_TOKEN }}
77+
# directory: ./coverage/packages/use-double-tap
78+
# flags: hooks,use-double-tap
79+
#
80+
# - name: Upload react-interval-hook coverage reports to Codecov
81+
# uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3
82+
# with:
83+
# token: ${{ secrets.CODECOV_TOKEN }}
84+
# directory: ./coverage/packages/react-interval-hook
85+
# flags: hooks,react-interval-hook

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"test": "nx run-many -t test",
88
"test:coverage": "nx run-many -t test --coverage",
99
"build": "nx run-many -t build",
10+
"typecheck": "nx run-many -t build --noEmit",
1011
"check": "nx run-many -t lint test build",
1112
"release": "tsx tools/scripts/release/release.ts"
1213
},

packages/react-interval-hook/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export default defineConfig({
6868
reportsDirectory: '../../coverage/packages/react-interval-hook',
6969
// Cover only lib files
7070
include: ['src/lib/**/*'],
71+
// you can include other reporters, but 'json-summary' is required, json is recommended
72+
reporter: ['text', 'json-summary', 'json'],
73+
// If you want a coverage reports even if your tests are failing, include the reportOnFailure option
74+
reportOnFailure: true,
7175
},
7276
},
7377
});

packages/use-double-tap/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export default defineConfig({
6969
reportsDirectory: '../../coverage/packages/use-double-tap',
7070
// Cover only lib files
7171
include: ['src/lib/**/*'],
72+
// you can include other reporters, but 'json-summary' is required, json is recommended
73+
reporter: ['text', 'json-summary', 'json'],
74+
// If you want a coverage reports even if your tests are failing, include the reportOnFailure option
75+
reportOnFailure: true,
7276
},
7377
},
7478
});

packages/use-long-press/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export default defineConfig({
6969
reportsDirectory: '../../coverage/packages/use-long-press',
7070
// Cover only lib files
7171
include: ['src/lib/**/*'],
72+
// you can include other reporters, but 'json-summary' is required, json is recommended
73+
reporter: ['text', 'json-summary', 'json'],
74+
// If you want a coverage reports even if your tests are failing, include the reportOnFailure option
75+
reportOnFailure: true,
7276
},
7377
},
7478
});

0 commit comments

Comments
 (0)