quick-junit 0.5.1

Data model and serializer for JUnit/XUnit XML
Documentation
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

name: CI
env:
  RUSTFLAGS: -D warnings
  CARGO_TERM_COLOR: always

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
      - name: Lint (clippy)
        run: cargo clippy --all-features --all-targets
      - name: Lint (rustfmt)
        run: cargo xfmt --check
      - name: Install cargo readme
        uses: taiki-e/install-action@5d427d86f088a6cedcddb92b3ad038d30721b52f # v2
        with:
          tool: cargo-readme
      - name: Run cargo readme
        run: ./scripts/regenerate-readmes.sh
      - name: Check for differences
        run: git diff --exit-code

  build-rustdoc:
    name: Build documentation
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
      fail-fast: false
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
      - name: Build rustdoc
        run: cargo doc --all-features

  build:
    name: Build and test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-latest
          # macos-14 for M1 runners
          - macos-14
          - windows-latest
        # 1.70 is the MSRV
        rust-version: ["1.70", stable]
      fail-fast: false
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust-version }}
      - uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
        with:
          key: ${{ matrix.rust-version }}
      - name: Install latest nextest release
        uses: taiki-e/install-action@nextest
      - name: Build quick-junit
        run: cargo build
      - name: Run tests
        run: cargo nextest run