diff options
author | Ryan Cumming <[email protected]> | 2019-06-29 21:56:46 +0100 |
---|---|---|
committer | Ryan Cumming <[email protected]> | 2019-06-29 22:12:42 +0100 |
commit | 60ba253753732080c90e97d2d34f43b71856a7c4 (patch) | |
tree | e1153f2fb7ce9a35ee9e13cb420beff298af6e43 | |
parent | 27df89f47d5f0a6e8e62d517d98dda854efabc34 (diff) |
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.
-rw-r--r-- | .travis.yml | 23 | ||||
-rw-r--r-- | editors/code/.prettierignore | 2 | ||||
-rw-r--r-- | editors/code/package.json | 2 |
3 files changed, 21 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index abaa1d2d6..e5960ebca 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -6,7 +6,8 @@ before_cache: | |||
6 | 6 | ||
7 | matrix: | 7 | matrix: |
8 | include: | 8 | include: |
9 | - os: linux | 9 | - name: "Rust Tests" |
10 | os: linux | ||
10 | dist: xenial | 11 | dist: xenial |
11 | language: rust | 12 | language: rust |
12 | rust: stable | 13 | rust: stable |
@@ -18,7 +19,8 @@ matrix: | |||
18 | env: | 19 | env: |
19 | - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 | 20 | - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 |
20 | 21 | ||
21 | - os: linux | 22 | - name: "Rust Docs" |
23 | os: linux | ||
22 | if: branch = master AND type = push | 24 | if: branch = master AND type = push |
23 | before_script: | 25 | before_script: |
24 | - DEPLOY_DOCS=1 | 26 | - DEPLOY_DOCS=1 |
@@ -29,11 +31,22 @@ matrix: | |||
29 | env: | 31 | env: |
30 | - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 | 32 | - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 |
31 | 33 | ||
32 | - language: node_js | 34 | - name: "VS Code Tests" |
35 | os: linux | ||
36 | language: node_js | ||
37 | dist: xenial | ||
33 | node_js: node | 38 | 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 | ||
35 | script: | 45 | 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" | ||
37 | 50 | ||
38 | branches: | 51 | branches: |
39 | only: | 52 | only: |
diff --git a/editors/code/.prettierignore b/editors/code/.prettierignore new file mode 100644 index 000000000..3798f2d1f --- /dev/null +++ b/editors/code/.prettierignore | |||
@@ -0,0 +1,2 @@ | |||
1 | node_modules/ | ||
2 | .vscode-test/ | ||
diff --git a/editors/code/package.json b/editors/code/package.json index 6e2dd0494..52972031d 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -25,7 +25,7 @@ | |||
25 | "lint": "tslint --project .", | 25 | "lint": "tslint --project .", |
26 | "test": "node node_modules/vscode/bin/test", | 26 | "test": "node node_modules/vscode/bin/test", |
27 | "prettier": "prettier **/*.{json,ts}", | 27 | "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" |
29 | }, | 29 | }, |
30 | "prettier": { | 30 | "prettier": { |
31 | "tabWidth": 4, | 31 | "tabWidth": 4, |