[go: up one dir, main page]

anes 0.0.2

An ANSI escape sequences.
Documentation
name: anes-rs test

on:
  # Build master branch only
  push:
    branches:
      - master
  # Build pull requests targeting master branch only
  pull_request:
    branches:
      - master

jobs:
  test:
    name: ${{matrix.rust}} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        rust: [stable, nightly]
        # Allow failures on nightly, it's just informative
        include:
          - rust: stable
            can-fail: false
          - rust: nightly
            can-fail: true
    steps:
      - name: Checkout repository
        uses: actions/checkout@v1
        with:
          fetch-depth: 1
      - name: Install Rust
        uses: hecrj/setup-rust-action@master
        with:
          rust-version: ${{ matrix.rust }}
          components: rustfmt, clippy
      - name: Toolchain Information
        run: |
          rustc --version
          rustfmt --version
          rustup --version
          cargo --version
      - name: Check formatting
        if: matrix.rust == 'stable'
        run: cargo fmt --all -- --check
      - name: Lint the code
        if: matrix.rust == 'stable'
        run: cargo clippy
      - name: Test build
        run: cargo build
        continue-on-error: ${{ matrix.can-fail }}
      - name: Test all features
        run: cargo test --all-features -- --nocapture --test-threads 1
        continue-on-error: ${{ matrix.can-fail }}
      - name: Test packaging
        if: matrix.rust == 'stable'
        run: cargo package
        continue-on-error: ${{ matrix.can-fail }}