Skip to content

Rust CI

Rust CI #3

Workflow file for this run

name: Rust CI
on:
pull_request:
push:
branches:
- main
- "release/**"
schedule:
- cron: "11 7 * * 1,4"
env:
RUSTFLAGS: -Dwarnings
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
env:
PWD: ${{ env.GITHUB_WORKSPACE }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --tests --examples
docs:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rust-docs
override: true
- uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [nightly, stable]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- uses: actions-rs/cargo@v1
env:
PWD: ${{ env.GITHUB_WORKSPACE }}
with:
command: test
args: --workspace
- uses: actions-rs/cargo@v1
env:
PWD: ${{ env.GITHUB_WORKSPACE }}
with:
command: test
args: --workspace --all-features
- uses: actions-rs/cargo@v1
env:
PWD: ${{ env.GITHUB_WORKSPACE }}
with:
command: test
args: --workspace --examples --bins
- uses: actions-rs/cargo@v1
env:
PWD: ${{ env.GITHUB_WORKSPACE }}
with:
command: test
args: --workspace --all-features --examples --bins