Skip to content

chore: add github actions #1

chore: add github actions

chore: add github actions #1

Workflow file for this run

name: rust-fmt analyze
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
concurrency:
# One build per PR, branch or tag
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
rust-fmt-analyze:
name: Run rust-fmt analyzing
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: cargo fmt
run: cargo fmt --all -- --check