106 lines
2.1 KiB
YAML
106 lines
2.1 KiB
YAML
name: build-testing
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- feature/github-actions
|
|
|
|
jobs:
|
|
tests:
|
|
name: ${{ matrix.rust }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
env:
|
|
RUST_BACKTRACE: full
|
|
RUSTV: ${{ matrix.rust }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Check it!
|
|
run: |
|
|
cargo check --all-targets --profile=test
|
|
|
|
- name: Build it!
|
|
run: |
|
|
cargo build
|
|
|
|
- name: Test it!
|
|
run: |
|
|
cargo test
|
|
|
|
rustfmt:
|
|
name: rustfmt
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
components: rustfmt
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
name: clippy
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
components: clippy
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
cargo clippy
|
|
|
|
docs:
|
|
name: docs
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Check documentation
|
|
env:
|
|
RUSTDOCFLAGS: -D warnings
|
|
run: |
|
|
cargo doc --no-deps --document-private-items --workspace
|
|
|
|
|
|
|