Skip to content

Commit 2793246

Browse files
authored
Merge pull request #7 from WendellXY/chore/ci-rust-matrix
Refactor Rust CI workflow to include testing steps
2 parents d5d0086 + 67c8044 commit 2793246

1 file changed

Lines changed: 28 additions & 8 deletions

File tree

.github/workflows/rust.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,33 @@ env:
1212
CARGO_TERM_COLOR: always
1313

1414
jobs:
15-
build:
16-
15+
test:
1716
runs-on: ubuntu-latest
18-
1917
steps:
20-
- uses: actions/checkout@v4
21-
- name: Build
22-
run: cargo build --verbose
23-
- name: Run tests
24-
run: cargo test --verbose
18+
- uses: actions/checkout@v4
19+
20+
- name: Install Rust (stable)
21+
uses: dtolnay/rust-toolchain@master
22+
with:
23+
toolchain: stable
24+
25+
- name: Cache Rust builds
26+
uses: Swatinem/rust-cache@v2
27+
28+
- name: Install cargo-binstall
29+
uses: taiki-e/install-action@v2
30+
with:
31+
tool: cargo-binstall
32+
33+
- name: Install langcodec-cli (prebuilt if available)
34+
run: cargo binstall -y langcodec-cli
35+
36+
- name: Verify CLI
37+
run: |
38+
langcodec --help
39+
40+
- name: Build
41+
run: cargo build --verbose
42+
43+
- name: Test
44+
run: cargo test --verbose

0 commit comments

Comments
 (0)