-
Notifications
You must be signed in to change notification settings - Fork 55
63 lines (48 loc) · 1.57 KB
/
Copy pathci.yml
File metadata and controls
63 lines (48 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy, llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo fmt --check
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo test --workspace
- name: Check documentation (catches broken intra-doc links)
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --workspace --no-deps --document-private-items
- name: Generate and print code coverage
run: cargo llvm-cov --workspace
- name: Generate code coverage HTML report
run: cargo llvm-cov report --html --output-dir coverage
- name: Upload coverage report artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
wasm-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
- uses: Swatinem/rust-cache@v2
- run: cargo build --target wasm32v1-none --release
- name: Upload built .wasm artifacts
uses: actions/upload-artifact@v4
with:
name: wasm-build-${{ github.sha }}
path: target/wasm32v1-none/release/*.wasm
if-no-files-found: error