-
Notifications
You must be signed in to change notification settings - Fork 62
60 lines (59 loc) · 3.17 KB
/
ci.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
50
51
52
53
54
55
56
57
58
59
60
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
unit-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests on Linux or macOS
run: |
cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,termion,arbitrary
cargo llvm-cov --color always --no-run
if: ${{ matrix.os != 'windows-latest' }}
- name: Run tests on Windows
run: |
cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,arbitrary
cargo llvm-cov --color always --no-run
if: ${{ matrix.os == 'windows-latest' }}
- run: cargo test --no-default-features --features=tuirs-crossterm,search -- --skip .rs
- run: cargo test --no-default-features --features=tuirs-termion,search -- --skip .rs
if: ${{ matrix.os != 'windows-latest' }}
- run: cargo test --no-default-features --features=no-backend,search -- --skip .rs
- run: cargo test --no-default-features --features=tuirs-no-backend,search -- --skip .rs
- uses: codecov/codecov-action@v3
with:
files: lcov.info
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt -- --check
- run: cargo clippy --examples --tests -- -D warnings
- run: cargo clippy --examples --tests --features search -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features termion -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features termion,search -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features termwiz -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features termwiz,search -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features no-backend -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features no-backend,search -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features tuirs-crossterm -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features tuirs-crossterm,search -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features tuirs-termion -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features tuirs-termion,search -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend,search -- -D warnings
- run: cargo rustdoc --features=search,termwiz,termion -p tui-textarea -- -D warnings