dotparser 0.3.0

diagram file parser for Bevy visualization of diagrams
Documentation
name: Rust CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - name: Install dependencies
      run: sudo apt-get update && sudo apt-get install -y g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0

    - name: Install Rust
      uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable
        override: true
        components: rustfmt, clippy

    - name: Cache dependencies
      uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-

    # - name: Check format
    #   uses: actions-rs/cargo@v1
    #   with:
    #     command: fmt
    #     args: --all -- --check

    - name: Install required cargo
      run: cargo install clippy-sarif sarif-fmt

    - name: Clippy
      run:
        cargo clippy --all-features --message-format=json -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt

      continue-on-error: true

    - name: Build
      uses: actions-rs/cargo@v1
      with:
        command: build
        args: --verbose

    - name: Run tests
      uses: actions-rs/cargo@v1
      with:
        command: test
        args: --verbose

    - name: Build release
      if: github.event_name == 'push' && github.ref == 'refs/heads/main'
      uses: actions-rs/cargo@v1
      with:
        command: build
        args: --release --verbose