mirror of https://github.com/chipsenkbeil/distant
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
2.8 KiB
YAML
99 lines
2.8 KiB
YAML
3 years ago
|
on: [push]
|
||
|
|
||
|
name: Core CI
|
||
|
|
||
|
jobs:
|
||
|
test-core:
|
||
|
name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }}
|
||
|
runs-on: ${{ matrix.os }}
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
include:
|
||
|
- { rust: stable, os: ubuntu-latest }
|
||
|
- { rust: stable, os: macos-latest }
|
||
|
- { rust: stable, os: windows-latest }
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cargo/registry
|
||
|
~/.cargo/git
|
||
|
target
|
||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- uses: hecrj/setup-rust-action@v1
|
||
|
with:
|
||
|
rust-version: ${{ matrix.rust }}
|
||
|
- name: Check Cargo availability
|
||
|
run: cargo --version
|
||
|
- run: cargo test --verbose -p distant-core
|
||
|
- run: cargo test --verbose --all-features -p distant-core
|
||
|
|
||
|
test-cli:
|
||
|
name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }}
|
||
|
runs-on: ${{ matrix.os }}
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
include:
|
||
|
- { rust: stable, os: ubuntu-latest }
|
||
|
- { rust: stable, os: macos-latest }
|
||
|
- { rust: stable, os: windows-latest }
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cargo/registry
|
||
|
~/.cargo/git
|
||
|
target
|
||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- uses: hecrj/setup-rust-action@v1
|
||
|
with:
|
||
|
rust-version: ${{ matrix.rust }}
|
||
|
- name: Check Cargo availability
|
||
|
run: cargo --version
|
||
|
- run: cargo test --verbose
|
||
|
|
||
|
clippy:
|
||
|
name: Lint with clippy
|
||
|
runs-on: ubuntu-latest
|
||
|
env:
|
||
|
RUSTFLAGS: -Dwarnings
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cargo/registry
|
||
|
~/.cargo/git
|
||
|
target
|
||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- uses: hecrj/setup-rust-action@v1
|
||
|
with:
|
||
|
components: clippy
|
||
|
- name: Check Cargo availability
|
||
|
run: cargo --version
|
||
|
- run: cargo clippy --workspace --all-targets --verbose
|
||
|
- run: cargo clippy --workspace --all-targets --verbose --all-features
|
||
|
|
||
|
rustfmt:
|
||
|
name: Verify code formatting
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cargo/registry
|
||
|
~/.cargo/git
|
||
|
target
|
||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- uses: hecrj/setup-rust-action@v1
|
||
|
with:
|
||
|
components: rustfmt
|
||
|
- name: Check Cargo availability
|
||
|
run: cargo --version
|
||
|
- run: cargo fmt --all -- --check
|