Skip to content

Commit

Permalink
build: drop Travis in favor of Actions
Browse files Browse the repository at this point in the history
GitHub Actions is running all tests already present on Travis, as well
as building on more platforms (OS X and Windows). With Travis we're also
getting timeouts more frequently than with Actions, which gives the
false impression tests are failing (making it harder to triage PRs ready
to merge).

To make our config simpler, CI.yml and pythonpackage.yml got merged. The
coverage is also increased by running tests on OS X.

Signed-off-by: Matheus Marchini <mmarchini@netflix.com>

Backport-PR-URL: #32608
PR-URL: #32450
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
cclauss authored and MylesBorins committed Apr 2, 2020
1 parent a506489 commit fae680f
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 179 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/CI.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: build-windows

on: [push, pull_request]

env:
PYTHON_VERSION: 2.7
FLAKY_TESTS: dontcare

jobs:
build-windows:
runs-on: windows-2016
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install deps
run: choco install nasm
- name: Environment Information
run: npx envinfo
- name: Build
run: ./vcbuild.bat
73 changes: 73 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: linters

on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
NODE_VERSION: 10.x

jobs:
lint-addon-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint addon docs
run: NODE=$(which node) make lint-addon-docs
lint-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint C/C++ files
run: make lint-cpp
lint-md:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint docs
run: |
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
NODE=$(which node) make lint-md
lint-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint JavaScript files
run: NODE=$(which node) make lint-js
lint-py:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint Python
run: |
make lint-py-build || true
NODE=$(which node) make lint lint-py
24 changes: 24 additions & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: misc

on: [push, pull_request]

env:
NODE_VERSION: 12.x

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: NODE=$(which node) make doc-only
- uses: actions/upload-artifact@v1
with:
name: docs
path: out/doc
23 changes: 23 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test-linux

on: [push, pull_request]

env:
PYTHON_VERSION: 2.7
FLAKY_TESTS: dontcare

jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1
- name: Test
run: make run-ci -j2 V=1
23 changes: 23 additions & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test-macOS

on: [push, pull_request]

env:
PYTHON_VERSION: 2.7
FLAKY_TESTS: dontcare

jobs:
test-macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j8 V=1
- name: Test
run: make run-ci -j8 V=1
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
!.gitkeep
!.mailmap
!.nycrc
!.travis.yml
!.eslintrc.yaml
!.cpplint

Expand Down
91 changes: 0 additions & 91 deletions .travis.yml

This file was deleted.

9 changes: 1 addition & 8 deletions doc/guides/collaborator-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,7 @@ fail before the change, and pass after the change.

All pull requests must pass continuous integration tests. Code changes must pass
on [project CI server](https://ci.nodejs.org/). Pull requests that only change
documentation and comments can use Travis CI results.

Travis CI jobs have a fixed running time limit that building Node.js sometimes
exceeds. If the `Compile Node.js` Travis CI job has timed out it will fail after
around 45 minutes. The exit code will be 143, indicating that a `SIGTERM` signal
terminated the `make` command. When this happens, restart the timed out job. It
will reuse built artifacts from the previous timed-out run, and thus take less
time to complete.
documentation and comments can use GitHub Actions results.

Do not land any pull requests without passing (green or yellow) CI runs. If
there are CI failures unrelated to the change in the pull request, try "Resume
Expand Down

0 comments on commit fae680f

Please sign in to comment.