2022-12-16 13:33:06 +00:00
|
|
|
name: Rust
|
2022-12-16 13:31:03 +00:00
|
|
|
|
2019-09-19 16:14:30 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
2022-12-16 13:31:03 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2019-09-19 16:14:30 +00:00
|
|
|
schedule:
|
2022-12-16 13:31:03 +00:00
|
|
|
- cron: '11 7 * * 1,4'
|
|
|
|
|
|
|
|
env:
|
|
|
|
RUSTFLAGS: -Dwarnings
|
2019-09-19 16:14:30 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-12-16 13:31:03 +00:00
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run cargo fmt
|
|
|
|
run: |
|
|
|
|
cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run cargo clippy
|
|
|
|
run: |
|
|
|
|
cargo clippy --workspace --tests --examples
|
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: -Dwarnings
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run cargo clippy
|
|
|
|
run: |
|
|
|
|
cargo doc --workspace --no-deps
|
2019-09-19 16:14:30 +00:00
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
steps:
|
2022-12-16 13:31:03 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run cargo test
|
|
|
|
run: |
|
|
|
|
cargo test --workspace
|