{"schema":"cmsg/1","type":"chore","scope":"global","summary":"standar… #19
This file contains hidden or 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
| name: Language Checks | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '.gitignore' | |
| - 'docs/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '.gitignore' | |
| - 'docs/**' | |
| merge_group: | |
| paths-ignore: | |
| - '**/*.md' | |
| - '.gitignore' | |
| - 'docs/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| rust: | |
| name: Rust checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch latest code | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| cache: true | |
| rustflags: '' | |
| components: rustfmt, clippy | |
| - name: Install nightly rustfmt | |
| run: rustup toolchain install nightly --component rustfmt | |
| - name: Install cargo-make | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-make | |
| - name: Install vibe-style (latest release) | |
| run: | | |
| set -euo pipefail | |
| VERSION="$(curl -fsSL https://api.github.com/repos/hack-ink/vibe-style/releases/latest | grep -oE '"tag_name": "v[^"]+"' | cut -d'"' -f4)" | |
| TARGET="x86_64-unknown-linux-gnu" | |
| ASSET="vibe-style-${TARGET}-${VERSION}.tgz" | |
| curl -fsSLO "https://github.com/hack-ink/vibe-style/releases/download/${VERSION}/${ASSET}" | |
| tar -xzf "${ASSET}" | |
| mkdir -p "$HOME/.cargo/bin" | |
| install -m 0755 "vibe-style-${TARGET}-${VERSION}/vstyle" "$HOME/.cargo/bin/vstyle" | |
| install -m 0755 "vibe-style-${TARGET}-${VERSION}/cargo-vstyle" "$HOME/.cargo/bin/cargo-vstyle" | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| - name: Install nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest | |
| - name: Run lint | |
| run: cargo make lint | |
| - name: Run Rust format checks | |
| run: cargo make fmt-rust-check | |
| - name: Run tests | |
| run: cargo make test-rust | |
| toml: | |
| name: TOML checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch latest code | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| cache: true | |
| rustflags: '' | |
| - name: Install cargo-make | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-make | |
| - name: Install taplo | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: taplo | |
| - name: Run TOML format checks | |
| run: cargo make fmt-toml-check |