Merge pull request #113 from weareseeed/v3.2.3 #163
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: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| build: | |
| name: 🏗 Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 14 | |
| cache: 'yarn' | |
| cache-dependency-path: yarn.lock | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 25 | |
| - name: tune linux network | |
| run: sudo ethtool -K eth0 tx off rx off | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --check-files | |
| - name: Cache build | |
| uses: actions/cache@v3 | |
| id: cache-build | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} | |
| lint: | |
| name: ⬣ ESLint | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - name: Setup node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 14 | |
| - name: Restore build | |
| uses: actions/cache@v3 | |
| id: restore-build | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} | |
| - name: Lint | |
| run: yarn lint | |
| test: | |
| name: 🧪 Test | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| strategy: | |
| matrix: | |
| node: ['14.x', '16.x'] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - name: Setup node ${{ matrix.node }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| # https://github.com/actions/virtual-environments/issues/1187 | |
| - name: tune linux network | |
| run: sudo ethtool -K eth0 tx off rx off | |
| - name: Restore build | |
| uses: actions/cache@v3 | |
| id: restore-build | |
| with: | |
| path: ./* | |
| key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }} | |
| - name: Run test | |
| run: yarn test |