Add pre-commit configuration (#20) #57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies (Linux) | |
| if: ${{matrix.os == 'ubuntu-latest' }} | |
| run: sudo apt install libasound2-dev | |
| - name: Install Rust 1.80 | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: 1.80.0 | |
| default: true | |
| override: true | |
| components: rustfmt, clippy | |
| - uses: LoliGothick/clippy-check@master | |
| continue-on-error: true | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose |