summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yaml
blob: 2718b2cb0d5103f1bb75e06315eef19e25de6f8a (plain)
name: Rust CI

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

jobs:
  test-std:
    name: Test with default features on stable Rust
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true

      - name: Install stable Rust toolchain
        run: |
          rustup toolchain install stable
          rustup default stable

      - name: Build (stable)
        run: cargo +stable build --all

      - name: Run tests (stable)
        run: cargo +stable test --all

  test-no-std:
    name: Test without default features on nightly Rust
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - name: Install nightly Rust toolchain
        run: |
          rustup toolchain install nightly
          rustup default nightly

      - name: Build (nightly, no default features)
        run: cargo +nightly build --all --no-default-features

      - name: Run tests (nightly, no default features)
        run: cargo +nightly test --all --no-default-features