feat: change travis to github-actions. #2
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| include: | |
| - node: '10.x' | |
| os: ubuntu-20.04 # 最后一个支持 Node 10 的运行器 | |
| - node: '12.x' | |
| os: ubuntu-20.04 | |
| - node: '14.x' | |
| os: ubuntu-latest | |
| - node: '16.x' | |
| os: ubuntu-latest | |
| - node: '18.x' | |
| os: ubuntu-latest | |
| - node: '20.x' | |
| os: ubuntu-latest | |
| - node: '22.x' | |
| os: ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm install | |
| - run: npm test |