Formatting job is now included inside specific wirdigen jobs. #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wirdigen Workflow | |
on: [ push, pull_request ] | |
jobs: | |
wirdigen_cli: | |
name: Wirdigen CLI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt, clippy | |
- name: Check formatting | |
uses: actions-rust-lang/rustfmt@v1 | |
with: | |
manifest-path: './Cargo.toml' | |
- name: Check sources | |
run: cargo check --release | |
- name: Run clippy | |
run: cargo clippy | |
- name: Build sources | |
run: cargo build --release | |
- name: Run tests | |
run: cargo test --release | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wirdigen_cli | |
path: target/release/wirdigen | |
retention-days: 7 | |
wirdigen_wasm: | |
name: Wirdigen WASM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check formatting | |
uses: actions-rust-lang/rustfmt@v1 | |
with: | |
manifest-path: './wasm/Cargo.toml' | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Build sources | |
run: wasm-pack build ./wasm -t nodejs --out-name wirdigen_wasm --target-dir target | |
- name: Pack NPM package | |
run: wasm-pack pack ./wasm | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wirdigen_wasm | |
path: wasm/pkg/*.tgz | |
retention-days: 7 |