[go: up one dir, main page]

ron 0.7.1

Rusty Object Notation
Documentation
name: CI
on:
  push:
    branches:
    - master
    - 'v*.*'
  pull_request:
    branches:
    - master
    - 'v*.*'
  schedule:
    - cron: '0 0 * * 0'

jobs:
  tests:
    name: Tests
    runs-on: ubuntu-latest

    strategy:
      matrix:
        rust: [1.36.0, stable, nightly]

    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          profile: minimal
          override: true
      - uses: actions-rs/cargo@v1
        name: Downgrade bitflags to MSRV
        if: ${{ matrix.rust }} == "1.36.0"
        with:
          command: update
          args: -p bitflags --precise 1.2.1
      - uses: actions-rs/cargo@v1
        name: Downgrade indexmap to MSRV
        if: ${{ matrix.rust }} == "1.36.0"
        with:
          command: update
          args: -p indexmap --precise 1.6.2
      - run: cargo test
      - run: cargo test --all-features

  clippy:
    name: "Clippy: stable"
    runs-on: ubuntu-latest
    continue-on-error: true
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          components: clippy
          override: true
      - uses: actions-rs/clippy-check@v1
        with:
          token: ${{ github.token }}
  
  rustfmt:
    name: "Format: stable"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          components: rustfmt
          override: true
      - run: cargo fmt -- --check

  coverage:
    name: "Coverage: nightly"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          profile: minimal
          components: llvm-tools-preview
          override: true
      - run: cargo install grcov --force --locked
      - run: |
          cargo test --all-features --all-targets
          grcov . -s . --binary-path ./target/debug/ \
            -t cobertura -o cobertura.xml --branch \
            --keep-only "src/*" \
            --keep-only "tests/*" \
            --ignore-not-existing \
            --excl-line GRCOV_EXCL_LINE \
            --excl-start GRCOV_EXCL_START \
            --excl-stop GRCOV_EXCL_STOP
        env:
          RUSTFLAGS: -Cinstrument-coverage
          RUSTDOCFLAGS: -Cinstrument-coverage
          LLVM_PROFILE_FILE: codecov-%p-%m.profraw
      - uses: codecov/codecov-action@v1
        with:
          fail_ci_if_error: true