diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d859a5d..6e33760 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,16 +15,9 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - args: --all-features + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo check --all-features test: name: Test Suite @@ -33,71 +26,45 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable - name: Cache cargo build uses: Swatinem/rust-cache@v1 - name: Check build with --no-default-features - uses: actions-rs/cargo@v1 - with: - command: build - args: --no-default-features + run: cargo build --no-default-features - name: Check build with default features - uses: actions-rs/cargo@v1 - with: - command: build + run: cargo build - name: Check build with tfidf feature - uses: actions-rs/cargo@v1 - with: - command: build - args: --features tfidf + run: cargo build --features tfidf - name: Check build with textrank feature - uses: actions-rs/cargo@v1 - with: - command: build - args: --features textrank + run: cargo build --features textrank - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --all --benches + run: cargo test --all-features --all --benches codecov: name: Code Coverage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: lcov.info fail_ci_if_error: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} fmt: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - command: fmt - args: --all -- --check + components: rustfmt + - run: cargo fmt --all -- --check