-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (44 loc) · 1.13 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
toolchain:
- stable
# minimum version
- "1.73"
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust ${{ matrix.toolchain }}
run: |
rustup toolchain install ${{ matrix.toolchain }} --component rustfmt,clippy --target wasm32-unknown-unknown
rustup default ${{ matrix.toolchain }}
- name: Check rustfmt
run:
cargo fmt --all -- --check
- name: Build
run: |
cargo build --release
- name: Test
run: |
cargo test --release
- name: Build (example)
run: |
cd examples/yew-nested-router-example
cargo build --release