name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '00 01 * * *'
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build doc
run: cargo doc --verbose
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- run: rustup component add rustfmt
- name: Check formatting
run: |
cargo fmt -- --check
clippy_check:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features