syntect 4.7.0

library for high quality syntax highlighting and code intelligence using Sublime Text's grammars
Documentation
name: CI

on:
  workflow_dispatch:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  MIN_SUPPORTED_RUST_VERSION: "1.51"
  CARGO_TERM_COLOR: always

jobs:
  min_version:
    name: Minimum supported rust version
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - uses: actions-rs/toolchain@v1
      with:
        toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
        default: true
        profile: minimal
        components: clippy
    - name: Run cargo clippy
      run: |
        # Must run before `cargo check` until we use Rust 1.52
        # See https://github.com/rust-lang/rust-clippy/issues/4612
        cargo clippy --all-targets --all-features -- \
          --allow clippy::unknown_clippy_lints \
          --allow clippy::unnecessary_cast \
          --allow clippy::block_in_if_condition_stmt
    - name: Run cargo check
      run: |
        cargo check --all-features --all-targets

  documentation:
    name: Documentation checks
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - run: RUSTDOCFLAGS='--deny warnings' cargo doc --no-deps --document-private-items --all-features

  build-and-test:
    name: Build and test
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true
    - name: Build
      run: |
        cargo build
    - name: Run tests
      run: |
        cargo test --features metadata
    - name: Run tests with fancy
      run: |
        # Run these tests in release mode since they're slow as heck otherwise
        cargo test --features default-fancy --no-default-features --release
    - name: Ensure highlight works without 'plist-load' and 'yaml-load' features
      run: |
        cargo run --example synhtml --no-default-features --features html,assets,dump-load,dump-create,regex-onig -- examples/synhtml.rs
    - name: make stuff
      run: |
        make assets
        make syntest
        make syntest-fancy
    - name: Docs
      run: |
        cargo doc
    - name: Run tests without default features
      run: |
        cargo test --lib --no-default-features
    - name: Run Xi tests
      run: |
        # Test the build configuration that Xi uses
        cargo test --lib --no-default-features --features "assets dump-load-rs"