Skip to content

Add GitHub Actions config #7

Add GitHub Actions config

Add GitHub Actions config #7

Workflow file for this run

name: Rust
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: Build
run: cargo build
- name: Build WASM
run: wasm-pack build --target web ./pack-wasm
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nightly Rust
run: |
rustup install --no-self-update nightly
rustup component add --toolchain nightly rustfmt
- name: Format Rust code
run: cargo +nightly fmt --all -- --check