Skip to content

formatting

formatting #10

Workflow file for this run

name: Rust CI
on:
push:
branches:
- master
paths:
- common/src/**
- common/examples/**
- common/Cargo.toml
- macro/src/**
- macro/examples/**
- macro/Cargo.toml
- examples/**
- docs/guide/**
- src/**
- .github/**
- Cargo.toml
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
paths:
- common/src/**
- common/examples/**
- common/Cargo.toml
- macro/src/**
- macro/examples/**
- macro/Cargo.toml
- examples/**
- docs/guide/**
- src/**
- .github/**
- Cargo.toml
jobs:
check:
if: github.event.pull_request.draft == false
name: Check
runs-on: ubuntu-latest
steps:
- uses: ilammy/setup-nasm@v1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev
- uses: actions/checkout@v3
- run: cargo check --all --examples --tests
test:
if: github.event.pull_request.draft == false
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: ilammy/setup-nasm@v1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev
- uses: actions/checkout@v3
- run: cargo test --lib --bins --tests --examples --workspace
fmt:
if: github.event.pull_request.draft == false
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: ilammy/setup-nasm@v1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt
- uses: actions/checkout@v3
- run: cargo fmt --all -- --check
clippy:
if: github.event.pull_request.draft == false
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: ilammy/setup-nasm@v1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev
- run: rustup component add clippy
- uses: actions/checkout@v3
- run: cargo clippy --workspace --examples --tests -- -D warnings