name: Test
on:
push:
branches:
pull_request:
branches:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # run daily at midnight
env:
CARGO_TERM_COLOR: always
jobs:
check-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: fmt
run: cargo fmt --check
- name: clippy
run: cargo clippy --all-features -- -D warnings
- name: check
run: cargo check
- name: test
run: cargo test