Skip to content

Commit bfb47c7

Browse files
authored
feat: Test merges with master (#1952)
I hope merge doesn’t run on the master branch. I disable the pull request events to prevent double builds.
1 parent bae3483 commit bfb47c7

File tree

4 files changed

+54
-6
lines changed

4 files changed

+54
-6
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Lint
2-
3-
on: [push]
4-
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
# pull_request:
7+
# types: [opened, synchronize]
58
jobs:
69
lint:
710
runs-on: ubuntu-latest

.github/workflows/test-merge.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test Merge
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
- '!master'
7+
# pull_request:
8+
# types: [opened, synchronize]
9+
jobs:
10+
test-merge:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
# chances are that we'll never break on a merge to master on just one version of node
15+
node-version: [12.x]
16+
os: [ubuntu-latest, windows-latest, macos-latest]
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: merge master
20+
run: git merge origin/master
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
# https://github.com/nodejs/node-gyp/issues/1663#issuecomment-535049449
26+
- name: patch node gyp on windows to support Visual Studio 2019
27+
if: matrix.os == 'windows-latest'
28+
shell: powershell
29+
run: |
30+
npm install --global node-gyp@latest
31+
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
32+
- name: npm install
33+
run: npm install
34+
- name: npm run rebuild
35+
run: npm run rebuild
36+
- name: npm test
37+
run: npm test
38+
- name: coverage
39+
run: npm run coverage
40+
env:
41+
CI: true

.github/workflows/test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Test
2-
3-
on: [push]
4-
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
# pull_request:
7+
# types: [opened, synchronize]
58
jobs:
69
test:
710
runs-on: ${{ matrix.os }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Node Serialport
22
[![Backers on Open Collective](https://opencollective.com/serialport/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/serialport/sponsors/badge.svg)](#sponsors) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)
33
[![codecov](https://codecov.io/gh/serialport/node-serialport/branch/master/graph/badge.svg)](https://codecov.io/gh/serialport/node-serialport)
4+
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fserialport%2Fnode-serialport%2Fbadge&style=flat-square)](https://actions-badge.atrox.dev/serialport/node-serialport/goto)
45
[![Build Status](https://travis-ci.org/serialport/node-serialport.svg?branch=master)](https://travis-ci.org/serialport/node-serialport)
56
[![Build status](https://ci.appveyor.com/api/projects/status/ijg4rnd9vi16tbgr/branch/master?svg=true)](https://ci.appveyor.com/project/serialport/node-serialport/branch/master)
67
[![Greenkeeper badge](https://badges.greenkeeper.io/serialport/node-serialport.svg)](https://greenkeeper.io/)

0 commit comments

Comments
 (0)