name: build

on:
  push:
    branches: [ main ]
    paths-ignore:
      - '**.md'
  pull_request:
    branches: [ main ]
    paths-ignore:
      - '**.md'

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: self-hosted
    steps:
    - uses: actions/checkout@v4

    - name: Build
      run: cargo build

    - name: Build cli
      run: cargo build --features cli

    - name: Build no-default-features
      run: cargo build --no-default-features

    - name: Run tests
      run: cargo test --all-features

    - name: Run clippy
      run: cargo clippy --all-features -- -D warnings