Skip to content

Commit

Permalink
Update actions to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Apr 11, 2024
1 parent eec9f7a commit d4c525f
Showing 1 changed file with 19 additions and 52 deletions.
71 changes: 19 additions & 52 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit d4c525f

Please sign in to comment.