Skip to content

Fix YAML indentation for WASM action #41

Fix YAML indentation for WASM action

Fix YAML indentation for WASM action #41

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
DATABASE_URL: postgres://user:password@localhost/dummy
jobs:
build_and_test:
name: Test & Doc Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Rust
run: |
rustup override set stable
rustup component add rustfmt
rustup component add clippy
- name: Check Formatting
run: cargo fmt -- --check
- name: Clippy (Linting)
run: cargo clippy --workspace -- -D warnings
- name: Build Workspace
run: cargo build --verbose --workspace --release
- name: Build WASM
run: |
rustup target add wasm32-unknown-unknown
cargo build -p cdd-cli --release --target wasm32-unknown-unknown --verbose || echo "WASM build failed as expected"
- name: Run Tests
run: cargo test --verbose --workspace
- name: Check Documentation
run: cargo doc --workspace --no-deps --document-private-items
env:
RUSTDOCFLAGS: "-D warnings"
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Run Test Coverage
run: cargo tarpaulin --fail-under 100 --workspace --out xml
- name: Upload artifacts (if tag)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
target/release/cdd-rust