Skip to content

Commit 0331c2d

Browse files
authored
Refactor Rust CI workflow to include testing steps
1 parent d5d0086 commit 0331c2d

1 file changed

Lines changed: 29 additions & 8 deletions

File tree

.github/workflows/rust.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,34 @@ 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+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
39+
langcodec-cli --version
40+
41+
- name: Build
42+
run: cargo build --verbose
43+
44+
- name: Test
45+
run: cargo test --verbose

0 commit comments

Comments
 (0)