Skip to content

Commit 60ba253

Browse files
committed
Run VS Code tests on CI
This is actually much faster than I expected; it takes about 13 seconds to download VS Code and run the unit tests. This means the VS Code tests are still significantly faster than the Rust ones. If this ends up being unreliable we can always remove it later or move it to a separate optional job. We also need to ignore the `.vscode-test` directory when running `prettier` or it will get upset about some temporary JSON files VS Code creates.
1 parent 27df89f commit 60ba253

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.travis.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ before_cache:
66

77
matrix:
88
include:
9-
- os: linux
9+
- name: "Rust Tests"
10+
os: linux
1011
dist: xenial
1112
language: rust
1213
rust: stable
@@ -18,7 +19,8 @@ matrix:
1819
env:
1920
- RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
2021

21-
- os: linux
22+
- name: "Rust Docs"
23+
os: linux
2224
if: branch = master AND type = push
2325
before_script:
2426
- DEPLOY_DOCS=1
@@ -29,11 +31,22 @@ matrix:
2931
env:
3032
- RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
3133

32-
- language: node_js
34+
- name: "VS Code Tests"
35+
os: linux
36+
language: node_js
37+
dist: xenial
3338
node_js: node
34-
before_script: false
39+
services:
40+
- xvfb
41+
before_install: cd editors/code
42+
install:
43+
- npm install
44+
- npm run vscode:prepublish
3545
script:
36-
- cd editors/code && npm ci && npm run travis
46+
- npm ci
47+
- npm run travis
48+
env:
49+
- CXX="g++-4.9", CC="gcc-4.9"
3750

3851
branches:
3952
only:

editors/code/.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.vscode-test/

editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"lint": "tslint --project .",
2626
"test": "node node_modules/vscode/bin/test",
2727
"prettier": "prettier **/*.{json,ts}",
28-
"travis": "npm run compile && npm run lint && npm run prettier -- --list-different"
28+
"travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --list-different"
2929
},
3030
"prettier": {
3131
"tabWidth": 4,

0 commit comments

Comments
 (0)