Skip to content

Commit ced50c0

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

File tree

2 files changed

+51
-0
lines changed

2 files changed

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

0 commit comments

Comments
 (0)