docs: 完整功能清单添加文档链接,修正 CHANGELOG 日期 #111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test & Coverage | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| name: Test on Node.js ${{ matrix.node-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Verify examples | |
| if: matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest' | |
| run: node scripts/verify-examples.js | |
| - name: Run coverage | |
| if: matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest' | |
| run: npm run coverage | |
| - name: Upload coverage to Codecov | |
| if: matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage/lcov.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint --if-present | |
| continue-on-error: true | |