Setup workflow to uv #257
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: 2023 The MalwareTracesGenerator development team | |
# | |
# SPDX-License-Identifier: CC0-1.0 | |
name: Check formatting of the project | |
on: [push, pull_request] | |
jobs: | |
yamlfix: | |
name: Check YAML formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: '3.12' | |
enable-cache: true | |
- name: Create requirements file for setup-python | |
run: touch ./requirements.txt | |
- name: Install yamlfix | |
run: uv pip install yamlfix | |
- name: Check YAML formatting | |
run: yamlfix -v --check . | |
mdformat: | |
name: Check Markdown formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: '3.12' | |
enable-cache: true | |
- name: Install Mdformat | |
run: uv pip install mdformat | |
- name: Check Markdown formatting | |
run: mdformat --check . | |
rustfmt: | |
name: Check Rust formatting | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install rustfmt | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Check Rust formatting | |
run: cargo fmt -v --all -- --check | |
taplo: | |
name: Check TOML formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install taplo | |
uses: uncenter/setup-taplo@v1 | |
- name: Check TOML formatting | |
run: taplo format --check --verbose |