Skip to content

Merge pull request #12 from JeromeSchmied/teachers_are_optional #7

Merge pull request #12 from JeromeSchmied/teachers_are_optional

Merge pull request #12 from JeromeSchmied/teachers_are_optional #7

Workflow file for this run

on:
push:
branches:
- master
pull_request:
branches:
- master
env:
RUST_VERSION: 1.80.0
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
override: true
components: clippy
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets --all-features -- -D warnings
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
# --all-targets includes --benches, which we don't want.
args: --workspace --all-features --lib --bins --tests --examples --verbose
rustfmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install nightly toolchain with rustfmt available
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check --verbose
doc:
name: Doc
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Run cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --verbose
- name: Run cargo test --doc
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features --doc --verbose