Skip to content

Fix clippy warnings (no breaking changes) #484

Fix clippy warnings (no breaking changes)

Fix clippy warnings (no breaking changes) #484

Workflow file for this run

name: Rust
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Download dictionary
run: bash fetch_dictionary.sh "20220519" "core"
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests (Debug)
run: cargo test --verbose
- name: Build CLI binary
run: cargo build -p sudachi-cli
- name: Check that binary works (C mode)
run: |
target/debug/sudachi .github/data/input.txt -o result-c.txt
git diff --color=always --no-index -- result-c.txt .github/data/expected-c.txt
- name: Check that binary works (A mode)
run: |
target/debug/sudachi .github/data/input.txt --mode=A -o result-a.txt
git diff --color=always --no-index -- result-a.txt .github/data/expected-a.txt
- name: Check that binary works (A mode / wakati)
run: |
target/debug/sudachi .github/data/input.txt --mode=A --wakati -o result-wakati-a.txt
git diff --color=always --no-index -- result-wakati-a.txt .github/data/expected-wakati-a.txt