coreos-stream-metadata 0.1.0

Fetch and parse stream metadata for Fedora CoreOS and derivatives
Documentation
---
name: Rust

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

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always
  # Pinned toolchain for linting
  ACTIONS_LINTS_TOOLCHAIN: 1.64.0

jobs:
  tests-stable:
    name: "Tests, stable toolchain"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Install toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          default: true
      - name: cargo build
        run: cargo build
      - name: cargo test
        run: cargo test
  tests-msrv:
    name: "Tests, minimum supported toolchain"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Detect crate MSRV
        shell: bash
        run: |
          msrv=$(cargo metadata --format-version 1 --no-deps | \
              jq -r '.packages | .[].rust_version')
          echo "Crate MSRV: $msrv"
          echo "MSRV=$msrv" >> $GITHUB_ENV
      - name: Install toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ env.MSRV }}
          default: true
      - name: cargo build
        run: cargo build
      - name: cargo test
        run: cargo test
  lints:
    name: "Lints, pinned toolchain"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Install toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ env['ACTIONS_LINTS_TOOLCHAIN']  }}
          default: true
          components: rustfmt, clippy
      - name: cargo fmt (check)
        run: cargo fmt -- --check -l
      - name: cargo clippy (warnings)
        run: cargo clippy -- -D warnings
      - name: cargo build
        run: cargo build
  tests-other-channels:
    name: "Tests, unstable toolchain"
    runs-on: ubuntu-latest
    continue-on-error: true
    strategy:
      matrix:
        channel:
          - beta
          - nightly
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Install toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.channel }}
          default: true
      - name: cargo build
        run: cargo build
      - name: cargo test
        run: cargo test