Skip to content

Merge pull request #1 from carougen/intro_to_math_crypto #4

Merge pull request #1 from carougen/intro_to_math_crypto

Merge pull request #1 from carougen/intro_to_math_crypto #4

Workflow file for this run

name: Format & Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
format-and-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain + components
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache target directory
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint with Clippy
run: cargo clippy --all -- -D warnings