Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
components: rustfmt
- name: check formatting
run: cargo fmt -- --check
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2

clippy:
name: clippy
Expand All @@ -41,10 +39,10 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run clippy action
uses: clechasseur/rs-clippy-check@v3
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Run clippy action
uses: clechasseur/rs-clippy-check@v3

doc:
name: doc
Expand All @@ -53,6 +51,8 @@ jobs:
- uses: actions/checkout@v4
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Run cargo doc
run: cargo doc --no-deps --all-features
env:
Expand All @@ -73,15 +73,15 @@ jobs:
uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test --locked
run: cargo test --locked --all-features --all-targets
- name: cargo test --doc
run: cargo test --doc --all-features
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Run browser headless tests
run: wasm-pack test --firefox --headless

Expand All @@ -106,6 +106,9 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2

- name: Cargo check
# we need to move the generated project to a temp folder, away from the template project
# otherwise cargo runs would fail
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Build website
shell: bash
run: scripts/build-examples.sh
Expand Down
10 changes: 4 additions & 6 deletions templates/simple/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
components: rustfmt
- name: check formatting
run: cargo fmt -- --check
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
clippy:
name: clippy
runs-on: ubuntu-latest
Expand All @@ -44,10 +42,10 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run clippy action
uses: clechasseur/rs-clippy-check@v3
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Run clippy action
uses: clechasseur/rs-clippy-check@v3
doc:
# run docs generation on nightly rather than stable. This enables features like
# https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an
Expand Down Expand Up @@ -79,11 +77,11 @@ jobs:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
# enable this ci template to run regardless of whether the lockfile is checked in or not
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test --locked
run: cargo test --locked --all-features --all-targets
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
Loading