add action for spell checker #8
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" | |
| LLVM_PATH: "${{ github.workspace }}/llvm" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install LLVM Dependencies | |
| run: | | |
| sudo apt update | |
| wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
| sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "18.1" | |
| directory: "${{ env.LLVM_PATH }}" | |
| - name: Install rust | |
| run: | | |
| rustup toolchain install stable --profile minimal --no-self-update | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@nextest | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Test with code coverage | |
| run: | | |
| cargo llvm-cov nextest --all-features --workspace --lcov --profile=ci --output-path lcov.info | |
| env: | |
| LLVM_SYS_181_PREFIX: "${{ env.LLVM_PATH }}" | |
| - name: Upload test results to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: target/nextest/ci/junit.xml | |
| report_type: test_results | |
| fail_ci_if_error: false | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info | |
| report_type: coverage | |
| fail_ci_if_error: false | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install LLVM Dependencies | |
| run: | | |
| sudo apt update | |
| wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
| sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "18.1" | |
| directory: "${{ env.LLVM_PATH }}" | |
| - name: Install rust | |
| run: | | |
| rustup toolchain install stable --profile minimal --no-self-update | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run clippy | |
| run: | | |
| cargo clippy --all-features --all-targets --keep-going -- -D warnings | |
| env: | |
| LLVM_SYS_181_PREFIX: "${{ env.LLVM_PATH }}" | |
| spell-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: streetsidesoftware/cspell-action@v8 | |
| # spell-checker:ignore libtinfo,Swatinem |