Skip to content

Commit c7bd7fa

Browse files
committed
Also run CI on pull requests.
1 parent 8e86098 commit c7bd7fa

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

.github/workflows/auto-merge.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
name: Auto-merge
2-
on: pull_request
1+
name: Node.js CI
32

4-
permissions:
5-
contents: write
6-
pull-requests: write
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
78

89
jobs:
9-
auto-merge:
10+
test:
1011
runs-on: ubuntu-latest
11-
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'auto-npm-upgrade[bot]' }}
12+
13+
strategy:
14+
matrix:
15+
node-version: [14.x, 16.x, 18.x]
16+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17+
1218
steps:
13-
- name: Enable auto-merge for Dependabot PRs
14-
run: gh pr merge --auto --merge "$PR_URL"
19+
- uses: actions/checkout@v3
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: "npm"
25+
- run: npm ci
26+
- run: npm run build
27+
- run: npm run test
1528
env:
16-
PR_URL: ${{github.event.pull_request.html_url}}
17-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)