|
|
|
@ -6,10 +6,10 @@ name: Node.js CI
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
|
branches: [ main ]
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
|
|
check:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
@ -20,10 +20,31 @@ jobs:
|
|
|
|
|
with:
|
|
|
|
|
version: 6.15.1
|
|
|
|
|
|
|
|
|
|
- name: Use Node.js 14.x
|
|
|
|
|
- name: Use Node.js 16.x
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
with:
|
|
|
|
|
node-version: 16.x
|
|
|
|
|
cache: 'pnpm'
|
|
|
|
|
|
|
|
|
|
- run: pnpm install
|
|
|
|
|
- run: pnpm lint
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
needs: check
|
|
|
|
|
if: github.event_name == 'push'
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Install pnpm
|
|
|
|
|
uses: pnpm/action-setup@v2.0.1
|
|
|
|
|
with:
|
|
|
|
|
version: 6.15.1
|
|
|
|
|
|
|
|
|
|
- name: Use Node.js 16.x
|
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
|
with:
|
|
|
|
|
node-version: 14.x
|
|
|
|
|
node-version: 16.x
|
|
|
|
|
cache: 'pnpm'
|
|
|
|
|
|
|
|
|
|
- run: pnpm install
|
|
|
|
|