name: CI

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

env:
  CARGO_TERM_COLOR: always
  CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
      - uses: actions-rs/cargo@v1
        with:
          command: test
          args: --no-default-features
      - uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all-features --all
      - uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all-features --all --release
