From b95449dc73d8e7d2fd4973ba055c33b687032945 Mon Sep 17 00:00:00 2001 From: yutingzhao1991 Date: Tue, 7 Nov 2023 21:02:59 +0800 Subject: [PATCH] chore: add test ci and show it in readme --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ README.md | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..aef895f3e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Test + +on: + push: + branches: [main] + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: ci + run: | + npm i pnpm -g + pnpm install + pnpm run test diff --git a/README.md b/README.md index eeec8dd8f..102a0120b 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,12 @@ A components collection for Web3. -[![NPM version][npm-image]][npm-url] +[![test status][github-action-image]][github-action-url] [![NPM version][npm-image]][npm-url] [![antd][antd-image]][antd-url] [![dumi][dumi-image]][dumi-url] +[github-action-image]: https://github.com/ant-design/ant-design-web3/workflows/test/badge.svg +[github-action-url]: https://github.com/ant-design/ant-design-web3/actions/workflows/test.yml [npm-image]: https://img.shields.io/npm/v/@ant-design/web3.svg?style=flat-square [npm-url]: http://npmjs.org/package/@ant-design/web3 [dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square