Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: combine lint and test workflows #2261

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,17 @@ jobs:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
node-version: [14.x]
config:
# arch isn't used and we have no way to use it currently
- { os: macos-latest, arch: x64 }
- { os: ubuntu-latest, arch: x64 }
- { os: windows-latest, arch: x64 }
- { os: windows-latest, arch: ia32 }
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
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: upgrade npm
run: npm install -g npm
- name: npm install
run: npm install
- name: npm run prebuild
run: npm run prebuild
node-version: 14.x
- run: npm ci
- run: npm run prebuild
env:
prebuild_upload: ${{ secrets.GITHUB_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/lint.yml

This file was deleted.

45 changes: 11 additions & 34 deletions .github/workflows/test-merge.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,24 @@
name: Test Merge
on:
push:
branches:
- '**'
- '!master'
# pull_request:
# types: [opened, synchronize]
name: Test Merge Commit
on: pull_request

jobs:
test-merge:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
# chances are that we'll never break on a merge to master on just one version of node
node-version: [14.x]
config:
# arch isn't used and we have no way to use it currently
- { os: macos-latest, arch: x64 }
- { os: ubuntu-latest, arch: x64 }
- { os: windows-latest, arch: x64 }
- { os: windows-latest, arch: ia32 }
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
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
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: upgrade npm
run: npm install -g npm
- 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
node-version: 14
- run: npm ci
- run: npm run rebuild
- run: npm test
- run: npm run coverage
env:
CI: true
45 changes: 18 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,34 @@
name: Test
name: Test / Lint
on:
push:
branches:
- '**'
# pull_request:
# types: [opened, synchronize]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm ci
- run: npm run lint
test:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [10.x, 12.x, 14.x, 16.x]
config:
# arch isn't used and we have no way to use it currently
- { os: macos-latest, arch: x64 }
- { os: ubuntu-latest, arch: x64 }
- { os: windows-latest, arch: x64 }
- { os: windows-latest, arch: ia32 }
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
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: upgrade npm
run: npm install -g npm
- 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
- run: npm ci
- run: npm run rebuild
- run: npm test
- run: npm run coverage
env:
CI: true