name: Build and test

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo build --verbose
      - name: Build cli
        run: cargo build --features cli --verbose
      - name: Test SDK
        run: cargo test --no-default-features --verbose
      - name: Run clippy
        run: cargo clippy --all-features -- -D warnings
