2020-01-04 07:33:25 +03:00
|
|
|
name: Cargo
|
|
|
|
|
2020-02-18 05:36:56 +03:00
|
|
|
on: push
|
|
|
|
#on:
|
|
|
|
# push:
|
|
|
|
# # Ignore commits created by bors
|
|
|
|
# branches-ignore:
|
|
|
|
# - 'staging'
|
|
|
|
# - 'trying'
|
|
|
|
# pull_request:
|
|
|
|
# branches-ignore:
|
|
|
|
# - 'staging'
|
|
|
|
# - 'trying'
|
2020-01-04 07:33:25 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
RUST_MIN_STACK: 16777216
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
CI: "1"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
fmt:
|
2020-01-17 12:44:51 +03:00
|
|
|
name: fmt
|
2020-01-04 07:33:25 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-02-09 20:35:40 +03:00
|
|
|
- name: Install nightly Rust
|
|
|
|
run: rustup toolchain install nightly
|
2020-01-04 07:33:25 +03:00
|
|
|
- name: Run cargo fmt
|
|
|
|
run: cargo fmt --all -- --check
|
|
|
|
|
|
|
|
test-debug:
|
2020-01-17 12:44:51 +03:00
|
|
|
name: test-debug
|
2020-01-04 07:33:25 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Checkout submodules
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
|
|
git submodule sync --recursive
|
|
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
|
|
|
|
|
|
- name: Install node dependencies
|
|
|
|
run: |
|
|
|
|
npm config set prefix ~/npm
|
2020-02-16 10:51:42 +03:00
|
|
|
npm i
|
2020-02-07 05:19:23 +03:00
|
|
|
npm i browserslist regenerator-runtime
|
2020-01-04 07:33:25 +03:00
|
|
|
npm i -g jest
|
|
|
|
|
|
|
|
# Ensure that all components all compilable.
|
|
|
|
- name: Run cargo check for all targets
|
|
|
|
run: cargo check --color always --all --all-targets
|
|
|
|
|
|
|
|
- name: Run cargo test
|
|
|
|
run: |
|
|
|
|
export PATH="$PATH:$HOME/npm/bin"
|
|
|
|
cargo test --color always --all
|
|
|
|
|
|
|
|
#
|
|
|
|
deploy-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
needs:
|
|
|
|
- test-debug
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Create rustdoc
|
|
|
|
run: cargo doc
|