diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 151d303..f860ff1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,31 +1,6 @@ -# 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 -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Test - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - +name: ✅ test +on: [push, pull_request] jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - - run: npm install - - run: npm run compile - - run: npm run lint - - run: npm run coverage - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + test: + uses: react-component/rc-test/.github/workflows/test.yml@main + secrets: inherit diff --git a/package.json b/package.json index f8c7b2c..14d6122 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ ], "scripts": { "bench": "vitest bench", - "compile": "father build", "coverage": "npm test -- --coverage", + "compile": "father build", "lint": "eslint src --ext .ts", "prepare": "tsx generate-presets", "prepublishOnly": "npm run compile && np --no-cleanup --no-publish",