forked from toshi-search/Toshi
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.48 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: toshi-push
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust & Tools
run: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
export PATH=$PATH:$HOME/.cargo/bin:/usr/local/cargo/bin
rustc --version && cargo --version
rustup component add rustfmt
rustup component add clippy
- name: Check & test
run: |
set -e
export PATH=$PATH:$HOME/.cargo/bin:/usr/local/cargo/bin
cargo fmt --all -- --check
cargo check --all
cargo clean
cargo clippy
cargo test --all --all-features
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust & Dependencies
run: |
set -e
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
export PATH=$PATH:$HOME/.cargo/bin:/usr/local/cargo/bin
rustc --version && cargo --version
rustup toolchain install nightly
- name: Check & test
run: |
set -e
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2 | tar jxf -
export PATH=$PATH:`pwd`
chmod +x ./ci/coverage.sh
./ci/coverage.sh codecov_io
export CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}
bash <(curl -s https://codecov.io/bash)