You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
1 year ago
|
name: 'Pull Request'
|
||
|
on:
|
||
|
pull_request:
|
||
|
types: [opened, reopened, synchronize]
|
||
|
|
||
|
jobs:
|
||
|
test:
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
node: [12, 14, 16, 18, 20]
|
||
|
name: Node ${{ matrix.node }}
|
||
|
steps:
|
||
|
- name: 'Checkout latest code'
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||
|
- name: Set up node
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: ${{ matrix.node }}
|
||
|
- name: Install dependencies
|
||
|
run: npm ci
|
||
|
- name: Run tests
|
||
|
run: npm run test
|
||
|
|
||
|
lint:
|
||
|
name: 'ESLint'
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout latest code
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||
|
- name: Set up node
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: '16'
|
||
|
- name: Install dependencies
|
||
|
run: npm install
|
||
|
- name: Run ESLint
|
||
|
run: npm run lint:check
|