Local test issl #1
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 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
permissions: | |
id-token: write | |
contents: read | |
checks: write | |
pull-requests: write | |
env: | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
rust: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
submodules: recursive | |
# for devtools-frontend | |
- uses: actions/[email protected] | |
with: | |
node-version: 21 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
version: '3.x' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get Rust toolchain | |
id: toolchain | |
run: | | |
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain >> "$GITHUB_OUTPUT" | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ steps.toolchain.outputs.toolchain }} | |
components: clippy, rustfmt | |
- name: cache dependencies | |
uses: Swatinem/[email protected] | |
- name: Install cargo-about | |
run: cargo install cargo-about --locked | |
- name: Install wasm-pack | |
run: cargo install wasm-pack --locked | |
- name: reviewdog / clippy | |
uses: sksat/[email protected] | |
with: | |
reporter: github-pr-review | |
clippy_flags: --locked | |
- name: format | |
run: | | |
cargo fmt --all -- --check | |
- name: unit test | |
run: | | |
cargo test --locked |