Skip to content

Commit 8726b8b

Browse files
Layouwenafc163
andauthored
test: use codecov/codecov-action (#45)
Co-authored-by: afc163 <afc163@gmail.com>
1 parent f8b536a commit 8726b8b

2 files changed

Lines changed: 5 additions & 52 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,6 @@
1-
name: Node.js CI
2-
1+
name: ✅ test
32
on: [push, pull_request]
4-
53
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
9-
strategy:
10-
matrix:
11-
node-version: [20.x]
12-
13-
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v3
16-
17-
- name: Install Node.js
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: ${{ matrix.node-version }}
21-
22-
- uses: pnpm/action-setup@v2
23-
name: Install pnpm
24-
with:
25-
version: 9.x
26-
run_install: false
27-
28-
- name: Get pnpm store directory
29-
shell: bash
30-
run: |
31-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32-
33-
- uses: actions/cache@v3
34-
name: Setup pnpm cache
35-
with:
36-
path: |
37-
${{ env.STORE_PATH }}
38-
/home/runner/.cache/Cypress
39-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
40-
restore-keys: |
41-
${{ runner.os }}-pnpm-store-
42-
43-
- name: Install dependencies
44-
run: pnpm install --frozen-lockfile
45-
- name: lint and tsc
46-
run: pnpm run lint && pnpm run tsc && pnpm run compile
47-
- run: pnpm test:ci
48-
env:
49-
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
50-
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v4
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
4+
test:
5+
uses: react-component/rc-test/.github/workflows/test.yml@main
6+
secrets: inherit

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"prepublishOnly": "npm run compile && np --yolo --no-publish",
3535
"lint": "eslint src/ docs/ --ext .tsx,.ts,.jsx,.js",
3636
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
37-
"test": "cypress run --component",
37+
"test": "cypress run --component && echo ''",
3838
"test:ci": "cypress run --component --record --key $CYPRESS_RECORD_KEY",
3939
"tsc": "tsc --noEmit",
4040
"now-build": "npm run build"

0 commit comments

Comments
 (0)