-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: combine lint and test workflows and clean them up (#2261)
- lint job is now part of the test workflow - test merge and test jobs are now easier to understand and no longer work around fixed bugs - test merge now runs on a pr event which should be a merge commit - everything should be faster
- Loading branch information
Showing
4 changed files
with
35 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |