Skip to content

ci: cache builds to speed up compilations #1354

ci: cache builds to speed up compilations

ci: cache builds to speed up compilations #1354

Workflow file for this run

name: Linter
on:
pull_request:
paths-ignore:
- "docs/**"
- "helm/**"
- "assets/**"
- "**.md"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
with:
shared-key: "target-cache"
- uses: actions-rs/cargo@v1
with:
command: test
fmt:
name: Rust fmt check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
with:
shared-key: "target-cache"
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Cargo Clippy check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
with:
shared-key: "target-cache"
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings