diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fa13b066..8c5eeb3d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,9 @@ version: 2 updates: +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" - package-ecosystem: npm directory: "/" schedule: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85650de4..41b0ecf0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,18 +13,18 @@ jobs: - name: checkout uses: actions/checkout@master - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' - name: cache package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: create package-lock.json - run: npm i --package-lock-only + run: npm i --package-lock-only --legacy-peer-deps - name: hack for singe file run: | @@ -34,7 +34,7 @@ jobs: cp package-lock.json package-temp-dir - name: cache node_modules id: node_modules_cache_id - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -47,16 +47,16 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -70,16 +70,16 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -93,21 +93,26 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - name: coverage - run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash) + run: npm test -- --coverage + + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true # optional (default = false) + token: ${{ secrets.CODECOV_TOKEN }} # required needs: setup diff --git a/.gitignore b/.gitignore index 58f701c7..338e0c94 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ .umi-test .env.local .dumi/ +package-lock.json diff --git a/README.md b/README.md index 56011fcf..89c46006 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,13 @@ open http://localhost:8000 ```js | pure import Form, { Field } from 'rc-field-form'; -const Input = ({ value = "", ...props }) => ; +const Input = ({ value = '', ...props }) => ; const Demo = () => { return (