-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1003 Bytes
/
node.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build and Test
on: [push, pull_request]
permissions:
pull-requests: write
contents: write
jobs:
test:
strategy:
matrix:
node: [ '16', '18' ]
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run test
- run: npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dependabot-auto-merge:
runs-on: ubuntu-latest
needs: [test]
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}