Update main.rs #14
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
name: rust_fmt_auto_build_test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
rust_fmt_auto_build_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache rust dependencies | |
uses: Swatinem/rust-cache@v2.7.3 | |
- name: Configure sccache | |
run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV; echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
- name: Run sccache-cache for artifacts | |
uses: mozilla-actions/sccache-action@v0.0.4 | |
- name: cargo fmt -- --check | |
run: cargo fmt -- --check | |
- name: cargo-install cargo-auto | |
uses: baptiste0928/cargo-install@v3.0.0 | |
with: | |
crate: cargo-auto | |
- name: cargo auto build | |
run: cargo auto build | |
- name: cargo auto test | |
run: cargo auto test | |