From c0f45c43253fd08e9716e106e6df3cb75154ef16 Mon Sep 17 00:00:00 2001 From: luoxiao Date: Fri, 8 Dec 2023 15:44:22 +0800 Subject: [PATCH] feat: add CI workflow --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ demo/Cargo.toml | 1 + 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..405928b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI +on: + pull_request: + paths: ["demo/**", "src/**", "Cargo.toml"] + branches: + - main + +jobs: + stable: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + override: true + - name: Install Trunk + uses: jetli/trunk-action@v0.4.0 + with: + version: "latest" + - name: Build + run: | + cd demo + trunk build --release + nightly: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + target: wasm32-unknown-unknown + override: true + - name: Install Trunk + uses: jetli/trunk-action@v0.4.0 + with: + version: "latest" + - name: Build + run: | + cd demo + trunk build --release --features nightly diff --git a/demo/Cargo.toml b/demo/Cargo.toml index 127f41a..a0f09c4 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -31,3 +31,4 @@ hydrate = [ "leptos_router/hydrate", "thaw/hydrate", ] +nightly = ["leptos/nightly", "leptos_meta/nightly", "leptos_router/nightly"]