Skip to content

Commit

Permalink
feat: Test merges with master (#1952)
Browse files Browse the repository at this point in the history
I hope merge doesn’t run on the master branch. I disable the pull request events to prevent double builds.
  • Loading branch information
reconbot authored Oct 3, 2019
1 parent bae3483 commit bfb47c7
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Lint

on: [push]

on:
push:
branches:
- '**'
# pull_request:
# types: [opened, synchronize]
jobs:
lint:
runs-on: ubuntu-latest
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/test-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Merge
on:
push:
branches:
- '**'
- '!master'
# pull_request:
# types: [opened, synchronize]
jobs:
test-merge:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# chances are that we'll never break on a merge to master on just one version of node
node-version: [12.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- name: merge master
run: git merge origin/master
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# https://github.com/nodejs/node-gyp/issues/1663#issuecomment-535049449
- name: patch node gyp on windows to support Visual Studio 2019
if: matrix.os == 'windows-latest'
shell: powershell
run: |
npm install --global node-gyp@latest
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: npm install
run: npm install
- name: npm run rebuild
run: npm run rebuild
- name: npm test
run: npm test
- name: coverage
run: npm run coverage
env:
CI: true
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Test

on: [push]

on:
push:
branches:
- '**'
# pull_request:
# types: [opened, synchronize]
jobs:
test:
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Node Serialport
[![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/)
[![codecov](https://codecov.io/gh/serialport/node-serialport/branch/master/graph/badge.svg)](https://codecov.io/gh/serialport/node-serialport)
[![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)
[![Build Status](https://travis-ci.org/serialport/node-serialport.svg?branch=master)](https://travis-ci.org/serialport/node-serialport)
[![Build status](https://ci.appveyor.com/api/projects/status/ijg4rnd9vi16tbgr/branch/master?svg=true)](https://ci.appveyor.com/project/serialport/node-serialport/branch/master)
[![Greenkeeper badge](https://badges.greenkeeper.io/serialport/node-serialport.svg)](https://greenkeeper.io/)
Expand Down

0 comments on commit bfb47c7

Please sign in to comment.