clang-format: custom format style and docs #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> | |
# SPDX-FileContributor: Andrew Hayzen <andrew.hayzen@kdab.com> | |
# | |
# SPDX-License-Identifier: MIT OR Apache-2.0 | |
name: clang-format-rs tests | |
on: [push, pull_request] | |
jobs: | |
license_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v1 | |
clippy_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- run: rustup component add clippy | |
- name: cargo clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets --all-features | |
format_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- run: rustup component add rustfmt | |
- name: cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
unit_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-targets --all-features | |
- name: cargo doc test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --doc |