Merge pull request #228 from Emmanueljr-stack/test/issue-178 #159
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup component add rustfmt clippy | |
| rustup target add wasm32v1-none | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit --locked | |
| - name: Audit dependencies | |
| run: cargo audit --deny warnings | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Lint | |
| run: cargo clippy --locked --all-targets -- -D warnings | |
| - name: Test | |
| run: cargo test --locked | |
| - name: Build WASM | |
| run: cargo build --locked --release --target wasm32v1-none | |
| - name: Upload WASM artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tricklepay_stream-${{ github.sha }} | |
| path: target/wasm32v1-none/release/tricklepay_stream.wasm | |
| retention-days: 90 |