Skip to content

Commit fae680f

Browse files
cclaussMylesBorins
authored andcommittedApr 2, 2020
build: drop Travis in favor of Actions
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>
1 parent a506489 commit fae680f

File tree

9 files changed

+167
-179
lines changed

9 files changed

+167
-179
lines changed
 

‎.github/workflows/CI.yml

-79
This file was deleted.

‎.github/workflows/build-windows.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: build-windows
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
PYTHON_VERSION: 2.7
7+
FLAKY_TESTS: dontcare
8+
9+
jobs:
10+
build-windows:
11+
runs-on: windows-2016
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python ${{ env.PYTHON_VERSION }}
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: ${{ env.PYTHON_VERSION }}
18+
- name: Install deps
19+
run: choco install nasm
20+
- name: Environment Information
21+
run: npx envinfo
22+
- name: Build
23+
run: ./vcbuild.bat

‎.github/workflows/linters.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: linters
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
PYTHON_VERSION: 3.8
7+
NODE_VERSION: 10.x
8+
9+
jobs:
10+
lint-addon-docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Use Node.js ${{ env.NODE_VERSION }}
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ env.NODE_VERSION }}
18+
- name: Environment Information
19+
run: npx envinfo
20+
- name: Lint addon docs
21+
run: NODE=$(which node) make lint-addon-docs
22+
lint-cpp:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Set up Python ${{ env.PYTHON_VERSION }}
27+
uses: actions/setup-python@v1
28+
with:
29+
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
30+
- name: Environment Information
31+
run: npx envinfo
32+
- name: Lint C/C++ files
33+
run: make lint-cpp
34+
lint-md:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Use Node.js ${{ env.NODE_VERSION }}
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: ${{ env.NODE_VERSION }}
42+
- name: Environment Information
43+
run: npx envinfo
44+
- name: Lint docs
45+
run: |
46+
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
47+
NODE=$(which node) make lint-md
48+
lint-js:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v2
52+
- name: Use Node.js ${{ env.NODE_VERSION }}
53+
uses: actions/setup-node@v1
54+
with:
55+
node-version: ${{ env.NODE_VERSION }}
56+
- name: Environment Information
57+
run: npx envinfo
58+
- name: Lint JavaScript files
59+
run: NODE=$(which node) make lint-js
60+
lint-py:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v2
64+
- name: Set up Python ${{ env.PYTHON_VERSION }}
65+
uses: actions/setup-python@v1
66+
with:
67+
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
68+
- name: Environment Information
69+
run: npx envinfo
70+
- name: Lint Python
71+
run: |
72+
make lint-py-build || true
73+
NODE=$(which node) make lint lint-py

‎.github/workflows/misc.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: misc
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
NODE_VERSION: 12.x
7+
8+
jobs:
9+
build-docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Use Node.js ${{ env.NODE_VERSION }}
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: ${{ env.NODE_VERSION }}
17+
- name: Environment Information
18+
run: npx envinfo
19+
- name: Build
20+
run: NODE=$(which node) make doc-only
21+
- uses: actions/upload-artifact@v1
22+
with:
23+
name: docs
24+
path: out/doc

‎.github/workflows/test-linux.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test-linux
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
PYTHON_VERSION: 2.7
7+
FLAKY_TESTS: dontcare
8+
9+
jobs:
10+
test-linux:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python ${{ env.PYTHON_VERSION }}
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: ${{ env.PYTHON_VERSION }}
18+
- name: Environment Information
19+
run: npx envinfo
20+
- name: Build
21+
run: make build-ci -j2 V=1
22+
- name: Test
23+
run: make run-ci -j2 V=1

‎.github/workflows/test-macos.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test-macOS
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
PYTHON_VERSION: 2.7
7+
FLAKY_TESTS: dontcare
8+
9+
jobs:
10+
test-macOS:
11+
runs-on: macos-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python ${{ env.PYTHON_VERSION }}
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: ${{ env.PYTHON_VERSION }}
18+
- name: Environment Information
19+
run: npx envinfo
20+
- name: Build
21+
run: make build-ci -j8 V=1
22+
- name: Test
23+
run: make run-ci -j8 V=1

‎.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
!.gitkeep
2020
!.mailmap
2121
!.nycrc
22-
!.travis.yml
2322
!.eslintrc.yaml
2423
!.cpplint
2524

‎.travis.yml

-91
This file was deleted.

‎doc/guides/collaborator-guide.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,7 @@ fail before the change, and pass after the change.
175175

176176
All pull requests must pass continuous integration tests. Code changes must pass
177177
on [project CI server](https://ci.nodejs.org/). Pull requests that only change
178-
documentation and comments can use Travis CI results.
179-
180-
Travis CI jobs have a fixed running time limit that building Node.js sometimes
181-
exceeds. If the `Compile Node.js` Travis CI job has timed out it will fail after
182-
around 45 minutes. The exit code will be 143, indicating that a `SIGTERM` signal
183-
terminated the `make` command. When this happens, restart the timed out job. It
184-
will reuse built artifacts from the previous timed-out run, and thus take less
185-
time to complete.
178+
documentation and comments can use GitHub Actions results.
186179

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

0 commit comments

Comments
 (0)
Please sign in to comment.