dorker 0.1.7

Docker for headless Android emulator environments
name: Rust Tests

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_INCREMENTAL: "0"

jobs:
  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # macOS CI is disabled for now; Linux only.
        # os: [ubuntu-latest, macos-15]
        os: [ubuntu-latest]
    steps:
      - name: Check out repository
        uses: actions/checkout@v6
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - name: Cache cargo build
        uses: Swatinem/rust-cache@v2
      - name: Format check
        run: cargo fmt -- --check
      - name: Clippy
        run: cargo clippy --all-targets -- -D warnings
      # Emulator-backed tests (`cargo test -- --ignored`) need a booted Android SDK
      # and hardware virtualisation, which hosted runners do not provide.
      - name: Install cargo-nextest
        uses: taiki-e/install-action@nextest
      - name: Test
        run: cargo nextest run