Skip to content

Commit 018b8be

Browse files
Update for yew 0.23: use #[component], modernize CI (#14)
also bumps MSRV to 1.84 since yew has raises its MSRV to 1.84, and yew-autoprops has to be used with yew, any version lower doesn't make any sense.
1 parent 72487b2 commit 018b8be

9 files changed

Lines changed: 434 additions & 611 deletions

File tree

.github/workflows/rust.yml

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,70 @@
1-
name: Rust
1+
name: Main Checks
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [main]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: [main]
88

99
env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build:
13+
test:
14+
name: Test
15+
runs-on: ubuntu-latest
1416
strategy:
17+
fail-fast: false
1518
matrix:
16-
rust:
19+
toolchain:
1720
- stable
18-
- 1.64.0
21+
- "1.84.0"
22+
23+
steps:
24+
- uses: actions/checkout@v6
25+
26+
- name: Setup toolchain
27+
uses: dtolnay/rust-toolchain@master
28+
with:
29+
toolchain: ${{ matrix.toolchain }}
30+
31+
- uses: Swatinem/rust-cache@v2
32+
with:
33+
save-if: ${{ github.ref == 'refs/heads/main' }}
34+
35+
- name: Run tests
36+
run: cargo test --verbose
37+
38+
clippy:
39+
name: Clippy
1940
runs-on: ubuntu-latest
2041
steps:
21-
- uses: actions/checkout@v3
22-
- uses: Swatinem/rust-cache@v2
23-
with:
24-
key: rust-${{ matrix.rust }}
25-
- run: rustup default ${{ matrix.rust }}
26-
- run: cargo test --verbose
42+
- uses: actions/checkout@v6
43+
44+
- name: Setup toolchain
45+
uses: dtolnay/rust-toolchain@master
46+
with:
47+
toolchain: stable
48+
components: clippy
49+
50+
- uses: Swatinem/rust-cache@v2
51+
with:
52+
save-if: ${{ github.ref == 'refs/heads/main' }}
53+
54+
- name: Run clippy
55+
run: cargo clippy --all-targets -- -D warnings
56+
57+
fmt:
58+
name: Formatting
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v6
62+
63+
- name: Setup toolchain
64+
uses: dtolnay/rust-toolchain@master
65+
with:
66+
toolchain: nightly
67+
components: rustfmt
68+
69+
- name: Check formatting
70+
run: cargo +nightly fmt --all -- --check

0 commit comments

Comments
 (0)