naive-ui/.github/workflows/node.js.yml
Sepush ce90d253e1
fix(ci): set NODE_OPTIONS=--unhandled-rejections=warn (#1522)
* ci:add node 16 to matrix

* fix(ci):set NODE_OPTIONS=--unhandled-rejections=warn
2021-11-06 02:27:38 +08:00

37 lines
1.0 KiB
YAML

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ main, feat, docs ]
pull_request:
branches: [ main, feat, docs ]
jobs:
build:
environment: test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6
- run: pnpm install
- run: pnpm run lint
- run: pnpm run test:cov
- uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}