ci #122
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
schedule: | |
- cron: "0 0 * * 1" # 0:00 on Mondays | |
workflow_call: | |
pull_request: | |
push: | |
jobs: | |
check: | |
name: Run `cargo check` | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Run `cargo check` | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
test: | |
name: Run `cargo test` | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Run `cargo test` | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
clippy: | |
name: Run `cargo clippy` | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- run: rustup component add clippy | |
- name: Run `cargo clippy` | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: | | |
--all-targets | |
--all-features | |
-- | |
--deny clippy::pedantic | |
--deny clippy::cargo | |
rustfmt: | |
name: Run `cargo fmt` | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- run: rustup component add rustfmt | |
- name: Run `cargo fmt` | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check |