-
Notifications
You must be signed in to change notification settings - Fork 284
79 lines (77 loc) · 2.7 KB
/
crossterm_test.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Crossterm Test
on:
# Build master branch only
push:
branches:
- master
# Build pull requests targeting master branch only
pull_request:
branches:
- master
jobs:
test:
name: ${{matrix.rust}} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macOS-latest]
rust: [stable, nightly]
# Allow failures on nightly, it's just informative
include:
- rust: stable
can-fail: false
- rust: nightly
can-fail: true
steps:
- name: Checkout Repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Rust
uses: hecrj/setup-rust-action@master
with:
rust-version: ${{ matrix.rust }}
components: rustfmt,clippy
- name: Toolchain Information
run: |
rustc --version
rustfmt --version
rustup --version
cargo --version
- name: Check Formatting
if: matrix.rust == 'stable'
run: cargo fmt --all -- --check
continue-on-error: ${{ matrix.can-fail }}
- name: Clippy
run: cargo clippy -- -D clippy::all
continue-on-error: ${{ matrix.can-fail }}
- name: Test Build
run: cargo build
continue-on-error: ${{ matrix.can-fail }}
- name: Test default features
run: cargo test --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test serde feature
run: cargo test --lib --features serde -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test event-stream feature
run: cargo test --lib --features "event-stream,events" -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test all features
run: cargo test --all-features -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test no default features
if: matrix.os != 'windows-2019'
run: cargo test --no-default-features -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test no default features with use-dev-tty feature enabled
if: matrix.os != 'windows-2019'
run: cargo test --no-default-features --features "use-dev-tty events" -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test no default features with windows feature enabled
if: matrix.os == 'windows-2019'
run: cargo test --no-default-features --features "windows" -- --nocapture --test-threads 1
- name: Test Packaging
if: matrix.rust == 'stable'
run: cargo package
continue-on-error: ${{ matrix.can-fail }}