Skip to content

Commit 12aef1c

Browse files
committed
Add basic CI
1 parent b1db01a commit 12aef1c

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021-2025 slowtec GmbH <post@slowtec.de>
2+
# SPDX-License-Identifier: CC0-1.0
3+
4+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
5+
6+
name: build-and-test
7+
8+
permissions:
9+
contents: read
10+
11+
on:
12+
push:
13+
branches:
14+
- main
15+
pull_request:
16+
branches:
17+
- main
18+
workflow_dispatch:
19+
20+
env:
21+
CARGO_TERM_COLOR: always
22+
23+
jobs:
24+
steps:
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
with:
28+
components: rustfmt,clippy
29+
targets: wasm32-unknown-unknown
30+
31+
- name: Checkout code
32+
uses: actions/checkout@v5
33+
34+
- name: Generate Cargo.lock
35+
run: cargo generate-lockfile
36+
37+
- name: Run tests
38+
run: cargo test --locked --target wasm32-unknown-unknown -- --nocapture --quiet
39+
40+
- name: Build documentation
41+
run: cargo doc --locked --target wasm32-unknown-unknown
42+
43+
- name: Build release
44+
run: cargo build --locked --target wasm32-unknown-unknown --profile release
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021-2025 slowtec GmbH <post@slowtec.de>
2+
# SPDX-License-Identifier: CC0-1.0
3+
4+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
5+
6+
name: dependency-audit
7+
8+
permissions:
9+
contents: read
10+
11+
on:
12+
push:
13+
paths:
14+
- "**/Cargo.toml"
15+
schedule:
16+
# Weekly, i.e. on Sunday at 04:37 UTC
17+
- cron: "37 4 * * 0"
18+
workflow_dispatch:
19+
20+
jobs:
21+
run:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
- name: Generate Cargo.lock
28+
run: cargo generate-lockfile
29+
30+
- uses: EmbarkStudios/cargo-deny-action@v1
31+
with:
32+
command: check
33+
arguments: >-
34+
--all-features
35+
--locked

0 commit comments

Comments
 (0)