Skip to content

ci

ci #122

Workflow file for this run

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