2019-11-18 08:13:31 +00:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- staging
|
2019-11-18 16:33:55 +00:00
|
|
|
- trying
|
2019-11-16 22:26:54 +00:00
|
|
|
|
|
|
|
jobs:
|
2019-11-18 08:13:31 +00:00
|
|
|
rust:
|
|
|
|
name: Rust
|
2019-11-16 22:26:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
RUSTFLAGS: -D warnings
|
|
|
|
CARGO_INCREMENTAL: 0
|
2019-12-07 11:46:36 +00:00
|
|
|
RUN_SLOW_TESTS: 1
|
2019-11-16 22:26:54 +00:00
|
|
|
steps:
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v1
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
components: rustfmt, rust-src
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Cargo target cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Compile
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --no-run
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Prepare build directory for cache
|
|
|
|
run: |
|
2019-12-07 11:46:36 +00:00
|
|
|
find ./target/debug -maxdepth 1 -type f -delete \
|
|
|
|
&& rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} \
|
|
|
|
&& rm -f ./target/.rustc_info.json \
|
|
|
|
&& rm ./target/.slow_tests_cookie
|
2019-11-18 08:13:31 +00:00
|
|
|
|
|
|
|
type-script:
|
|
|
|
name: TypeScript
|
2019-11-16 22:26:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
CXX: g++-4.9
|
|
|
|
CC: gcc-4.9
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v1
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Install Nodejs
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Install xvfb
|
|
|
|
run: sudo apt-get install xvfb
|
|
|
|
- run: npm ci
|
|
|
|
working-directory: ./editors/code
|
|
|
|
- run: npm run vscode:prepublish
|
|
|
|
working-directory: ./editors/code
|
2019-11-17 00:51:12 +00:00
|
|
|
- run: xvfb-run --auto-servernum npm run travis
|
2019-11-16 22:26:54 +00:00
|
|
|
working-directory: ./editors/code
|
2019-11-18 08:13:31 +00:00
|
|
|
|
2019-11-16 22:26:54 +00:00
|
|
|
- name: Cleanup xvfb
|
|
|
|
uses: bcomnes/cleanup-xvfb@v1
|