|
1 |
| -name: Test |
| 1 | +# ------------------------------------------------------------------- |
| 2 | +# ------------------------------- WARNING --------------------------- |
| 3 | +# ------------------------------------------------------------------- |
| 4 | +# |
| 5 | +# This file was automatically generated by gh-workflows using the |
| 6 | +# gh-workflow-gen bin. You should add and commit this file to your |
| 7 | +# git repository. **DO NOT EDIT THIS FILE BY HAND!** Any manual changes |
| 8 | +# will be lost if the file is regenerated. |
| 9 | +# |
| 10 | +# To make modifications, update your `build.rs` configuration to adjust |
| 11 | +# the workflow description as needed, then regenerate this file to apply |
| 12 | +# those changes. |
| 13 | +# |
| 14 | +# ------------------------------------------------------------------- |
| 15 | +# ----------------------------- END WARNING ------------------------- |
| 16 | +# ------------------------------------------------------------------- |
2 | 17 |
|
| 18 | +name: Build and Test |
3 | 19 | on:
|
4 | 20 | push:
|
5 | 21 | branches:
|
6 |
| - - main |
7 |
| - pull_request: |
8 |
| - |
9 |
| -env: |
10 |
| - CARGO_TERM_COLOR: always |
11 |
| - |
| 22 | + - main |
| 23 | + pull_request_target: |
| 24 | + types: |
| 25 | + - opened |
| 26 | + - synchronize |
| 27 | + - reopened |
| 28 | + branches: |
| 29 | + - main |
12 | 30 | jobs:
|
13 |
| - cargo_build_and_test: |
14 |
| - name: Cargo Build & Test |
| 31 | + build: |
| 32 | + name: Build and Test Rust SDK |
15 | 33 | runs-on: ubuntu-latest
|
16 |
| - strategy: |
17 |
| - matrix: |
18 |
| - toolchain: |
19 |
| - - stable |
20 | 34 | steps:
|
21 |
| - - uses: actions/checkout@v4 |
22 |
| - with: |
23 |
| - submodules: true |
24 |
| - - run: npm ci |
25 |
| - - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} |
26 |
| - - run: cargo build --verbose --all-targets |
27 |
| - - run: cargo test --verbose |
28 |
| - - run: cargo doc --verbose |
| 35 | + - name: Checkout Code |
| 36 | + uses: actions/checkout@v4 |
| 37 | + - name: Setup Rust Toolchain |
| 38 | + uses: actions-rust-lang/setup-rust-toolchain@v1 |
| 39 | + with: |
| 40 | + toolchain: stable, nightly |
| 41 | + components: clippy, rustfmt |
| 42 | + - name: Cargo Test |
| 43 | + run: cargo test --all-features --workspace |
| 44 | + - name: Cargo Fmt |
| 45 | + run: cargo +nightly fmt --check |
| 46 | + - name: Cargo Clippy |
| 47 | + run: cargo +nightly clippy --all-features --workspace -- -D warnings |
0 commit comments