Skip to content

Commit 1d05eb6

Browse files
committed
Add GitHub Actions config
For checking the code still builds when a PR is proposed
1 parent 8dc1c14 commit 1d05eb6

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/rust.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install protobuf-compiler
20+
cargo install wasm-pack
21+
- name: Build
22+
run: cargo build
23+
- name: Build WASM
24+
run: wasm-pack build --target web ./pack-wasm
25+
- name: Run clippy
26+
uses: actions-rs/clippy-check@v1
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
format:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Install Nightly Rust
35+
run: |
36+
rustup install --no-self-update nightly
37+
rustup component add --toolchain nightly rustfmt
38+
- name: Format Rust code
39+
run: cargo +nightly fmt --all -- --check

0 commit comments

Comments
 (0)