Skip to content

Commit

Permalink
chore(ci): run all examples under stable and fix remaining linting is…
Browse files Browse the repository at this point in the history
…sue (#2503)
  • Loading branch information
gbj authored Apr 5, 2024
1 parent a1a9890 commit ab1c4ca
Show file tree
Hide file tree
Showing 38 changed files with 49 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-changed-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
toolchain: nightly-2024-03-31
toolchain: stable
2 changes: 1 addition & 1 deletion .github/workflows/ci-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
toolchain: nightly-2024-03-31
toolchain: stable
2 changes: 1 addition & 1 deletion cargo-make/check.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ alias = "check-all"

[tasks.check-all]
command = "cargo"
args = ["+nightly-2024-03-31", "check-all-features"]
args = ["check-all-features"]
install_crate = "cargo-all-features"
2 changes: 1 addition & 1 deletion cargo-make/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ alias = "test-all"

[tasks.test-all]
command = "cargo"
args = ["+nightly-2024-03-31", "test-all-features"]
args = ["test-all-features"]
install_crate = "cargo-all-features"
4 changes: 2 additions & 2 deletions examples/cargo-make/cargo-leptos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ clear = true
dependencies = ["check-debug", "check-release"]

[tasks.check-debug]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"

[tasks.check-release]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["check-all-features", "--release"]
install_crate = "cargo-all-features"
Expand Down
4 changes: 2 additions & 2 deletions examples/cargo-make/compile.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tasks.build]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["build-all-features"]
install_crate = "cargo-all-features"

[tasks.check]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
4 changes: 2 additions & 2 deletions examples/cargo-make/deno-build.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ clear = true
dependencies = ["check-debug", "check-release"]

[tasks.check-debug]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"

[tasks.check-release]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["check-all-features", "--release"]
install_crate = "cargo-all-features"
2 changes: 1 addition & 1 deletion examples/counter/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/counter_url_query/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/counters/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/directives/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/error_boundary/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/errors_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/fetch/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/hackernews/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/hackernews_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/hackernews_islands_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
4 changes: 2 additions & 2 deletions examples/js-framework-benchmark/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ extend = [
]

[tasks.build]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["build-all-features", "--target", "wasm32-unknown-unknown"]
install_crate = "cargo-all-features"

[tasks.check]
toolchain = "nightly-2024-03-31"
toolchain = "stable"
command = "cargo"
args = ["check-all-features", "--target", "wasm32-unknown-unknown"]
install_crate = "cargo-all-features"
Expand Down
2 changes: 1 addition & 1 deletion examples/js-framework-benchmark/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/parent_child/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/portal/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
10 changes: 4 additions & 6 deletions examples/portal/tests/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn portal() {
// check HTML
assert_eq!(
div.inner_html(),
"<!-- <App> --><div><button id=\"btn-show\">\n Show Overlay\n </button><!-- <Show> --><!-- <DynChild> --><!-- <> --><div>Show</div><!-- <Portal> --><!-- <() /> --><!-- </Portal> --><!-- </> --><!-- </DynChild> --><!-- </Show> --></div><!-- </App> --><div><!-- <> --><div style=\"position: fixed; z-index: 10; width: 100vw; height: 100vh; top: 0; left: 0; background: rgba(0, 0, 0, 0.8); color: white;\"><p>This is in the body element</p><button id=\"btn-hide\">\n Close Overlay\n </button><button id=\"btn-toggle\">\n Toggle inner\n </button><!-- <Show> --><!-- <DynChild> -->Hidden<!-- </DynChild> --><!-- </Show> --></div><!-- </> --></div>"
"<!-- <App> --><div><button id=\"btn-show\">Show Overlay</button><!-- <Show> --><!-- <DynChild> --><!-- <> --><div>Show</div><!-- <Portal> --><!-- <() /> --><!-- </Portal> --><!-- </> --><!-- </DynChild> --><!-- </Show> --></div><!-- </App> --><div><!-- <> --><div style=\"position: fixed; z-index: 10; width: 100vw; height: 100vh; top: 0; left: 0; background: rgba(0, 0, 0, 0.8); color: white;\"><p>This is in the body element</p><button id=\"btn-hide\">Close Overlay</button><button id=\"btn-toggle\">Toggle inner</button><!-- <Show> --><!-- <DynChild> -->Hidden<!-- </DynChild> --><!-- </Show> --></div><!-- </> --></div>"
);

let toggle_button = document
Expand All @@ -45,8 +45,8 @@ async fn portal() {

assert_eq!(
div.inner_html(),
"<!-- <App> --><div><button id=\"btn-show\">\n Show Overlay\n </button><!-- <Show> --><!-- <DynChild> --><!-- <> --><div>Show</div><!-- <Portal> --><!-- <() /> --><!-- </Portal> --><!-- </> --><!-- </DynChild> --><!-- </Show> --></div><!-- </App> --><div><!-- <> --><div style=\"position: fixed; z-index: 10; width: 100vw; height: 100vh; top: 0; left: 0; background: rgba(0, 0, 0, 0.8); color: white;\"><p>This is in the body element</p><button id=\"btn-hide\">\n Close Overlay\n </button><button id=\"btn-toggle\">\n Toggle inner\n </button><!-- <Show> --><!-- <DynChild> --><!-- <> -->\n Visible\n <!-- </> --><!-- </DynChild> --><!-- </Show> --></div><!-- </> --></div>"
);
"<!-- <App> --><div><button id=\"btn-show\">Show Overlay</button><!-- <Show> --><!-- <DynChild> --><!-- <> --><div>Show</div><!-- <Portal> --><!-- <() /> --><!-- </Portal> --><!-- </> --><!-- </DynChild> --><!-- </Show> --></div><!-- </App> --><div><!-- <> --><div style=\"position: fixed; z-index: 10; width: 100vw; height: 100vh; top: 0; left: 0; background: rgba(0, 0, 0, 0.8); color: white;\"><p>This is in the body element</p><button id=\"btn-hide\">Close Overlay</button><button id=\"btn-toggle\">Toggle inner</button><!-- <Show> --><!-- <DynChild> --><!-- <> -->Visible<!-- </> --><!-- </DynChild> --><!-- </Show> --></div><!-- </> --></div>"
);

let hide_button = document
.get_element_by_id("btn-hide")
Expand All @@ -57,8 +57,6 @@ async fn portal() {

assert_eq!(
div.inner_html(),
"<!-- <App> --><div><button id=\"btn-show\">\n Show \
Overlay\n </button><!-- <Show> --><!-- <DynChild> --><!-- \
<() /> --><!-- </DynChild> --><!-- </Show> --></div><!-- </App> -->"
"<!-- <App> --><div><button id=\"btn-show\">Show Overlay</button><!-- <Show> --><!-- <DynChild> --><!-- <() /> --><!-- </DynChild> --><!-- </Show> --></div><!-- </App> -->"
);
}
2 changes: 1 addition & 1 deletion examples/router/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/server_fns_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/session_auth_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/slots/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/ssr_modes/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
6 changes: 3 additions & 3 deletions examples/ssr_modes/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ fn Post() -> impl IntoView {
};

let post_view = move || {
post().and_then(|post| {
Ok(view! {
post().map(|post| {
view! {
// render content
<h1>{&post.title}</h1>
<p>{&post.content}</p>
Expand All @@ -107,7 +107,7 @@ fn Post() -> impl IntoView {
// when it's first served
<Title text=post.title.clone()/>
<Meta name="description" content=post.content.clone()/>
})
}
})
};

Expand Down
2 changes: 1 addition & 1 deletion examples/ssr_modes_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
6 changes: 3 additions & 3 deletions examples/ssr_modes_axum/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ fn Post() -> impl IntoView {
};

let post_view = move || {
post().and_then(|post| {
Ok(view! {
post().map(|post| {
view! {
// render content
<h1>{&post.title}</h1>
<p>{&post.content}</p>
Expand All @@ -107,7 +107,7 @@ fn Post() -> impl IntoView {
// when it's first served
<Title text=post.title.clone()/>
<Meta name="description" content=post.content.clone()/>
})
}
})
};

Expand Down
2 changes: 1 addition & 1 deletion examples/tailwind_actix/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/tailwind_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/tailwind_csr/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/timer/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/todo_app_sqlite/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/todo_app_sqlite_axum/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/todo_app_sqlite_csr/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-31"
channel = "stable" # test change
2 changes: 1 addition & 1 deletion examples/todomvc/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable"
channel = "stable" # test change

0 comments on commit ab1c4ca

Please sign in to comment.