minicrossterm/.github/workflows/crossterm_test.yml

78 lines
2.7 KiB
YAML
Raw Normal View History

2019-09-13 05:33:33 +10:00
name: Crossterm Test
on:
# Build master branch only
2019-09-13 05:33:33 +10:00
push:
branches:
- master
# Build pull requests targeting master branch only
pull_request:
branches:
- master
2019-09-13 05:33:33 +10:00
jobs:
test:
name: ${{matrix.rust}} on ${{ matrix.os }}
2019-09-13 05:33:33 +10:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macOS-latest]
2019-09-13 05:33:33 +10:00
rust: [stable, nightly]
# Allow failures on nightly, it's just informative
include:
- rust: stable
can-fail: false
- rust: nightly
can-fail: true
2019-09-13 05:33:33 +10:00
steps:
- name: Checkout Repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Rust
uses: hecrj/setup-rust-action@master
2019-09-13 05:33:33 +10:00
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
2019-09-13 05:33:33 +10:00
run: cargo build
continue-on-error: ${{ matrix.can-fail }}
- name: Test all features
run: cargo test --all-features --no-default-features -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
2019-11-19 07:50:57 +11:00
- name: Test cursor feature
run: cargo test --features cursor --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
2019-11-19 07:50:57 +11:00
- name: Test style feature
run: cargo test --features style --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
2019-11-19 07:50:57 +11:00
- name: Test terminal feature
run: cargo test --features terminal --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
2019-11-19 07:50:57 +11:00
- name: Test screen feature
run: cargo test --features screen --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
2019-11-19 07:50:57 +11:00
- name: Test event feature
run: cargo test --features event --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test async-event feature
run: cargo test --features event-stream --no-default-features --lib -- --nocapture --test-threads 1
continue-on-error: ${{ matrix.can-fail }}
- name: Test Packaging
if: matrix.rust == 'stable'
run: cargo package
continue-on-error: ${{ matrix.can-fail }}