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.
This commit is contained in:
Ryan Cumming 2019-06-30 06:56:46 +10:00
parent 27df89f47d
commit 60ba253753
3 changed files with 21 additions and 6 deletions

View File

@ -6,7 +6,8 @@ before_cache:
matrix: matrix:
include: include:
- os: linux - name: "Rust Tests"
os: linux
dist: xenial dist: xenial
language: rust language: rust
rust: stable rust: stable
@ -18,7 +19,8 @@ matrix:
env: env:
- RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
- os: linux - name: "Rust Docs"
os: linux
if: branch = master AND type = push if: branch = master AND type = push
before_script: before_script:
- DEPLOY_DOCS=1 - DEPLOY_DOCS=1
@ -29,11 +31,22 @@ matrix:
env: env:
- RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
- language: node_js - name: "VS Code Tests"
os: linux
language: node_js
dist: xenial
node_js: node node_js: node
before_script: false services:
- xvfb
before_install: cd editors/code
install:
- npm install
- npm run vscode:prepublish
script: script:
- cd editors/code && npm ci && npm run travis - npm ci
- npm run travis
env:
- CXX="g++-4.9", CC="gcc-4.9"
branches: branches:
only: only:

View File

@ -0,0 +1,2 @@
node_modules/
.vscode-test/

View File

@ -25,7 +25,7 @@
"lint": "tslint --project .", "lint": "tslint --project .",
"test": "node node_modules/vscode/bin/test", "test": "node node_modules/vscode/bin/test",
"prettier": "prettier **/*.{json,ts}", "prettier": "prettier **/*.{json,ts}",
"travis": "npm run compile && npm run lint && npm run prettier -- --list-different" "travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --list-different"
}, },
"prettier": { "prettier": {
"tabWidth": 4, "tabWidth": 4,