Skip to content

fix(rust): removed deprecated lint (#146) #576

fix(rust): removed deprecated lint (#146)

fix(rust): removed deprecated lint (#146) #576

Workflow file for this run

on:
pull_request:
paths:
- 'Cargo.lock'
- 'Cargo.toml'
- 'rust-toolchain.toml'
- '.rustfmt.toml'
- 'crates/**'
push:
branches:
- main
- staging
- trying
paths:
- 'Cargo.lock'
- 'Cargo.toml'
- 'rust-toolchain.toml'
- '.rustfmt.toml'
- 'crates/**'
name: punktf CI
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings -W rust-2021-compatibility"
RUSTUP_MAX_RETRIES: 10
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
# This plugin should be loaded after toolchain setup
- name: Cache
uses: Swatinem/rust-cache@v2
# `test` is used instead of `build` to also include the test modules in
# the compilation check.
- name: Compile
uses: actions-rs/cargo@v1
with:
command: test
args: --no-run
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: -- --nocapture --quiet
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
# This pluging should be loaded after toolchain setup
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
typos:
name: Typos
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/typos@master