-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.84 KB
/
rust.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
name: Rust
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo nextest run --verbose
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- uses: actions/checkout@v4
- name: Install Rust
run: |
rustup update nightly
- name: Install cargo-llvm-cov
run: rustup component add llvm-tools-preview --toolchain nightly
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Collect coverage data (including doctests)
run: |
cargo llvm-cov --no-report nextest --ignore-filename-regex calloop-0.10.6/*
cargo llvm-cov --no-report --doc --ignore-filename-regex calloop-0.10.6/*
cargo llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex calloop-0.10.6/*
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Build docs
run: cargo doc --verbose --all-features --workspace
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc