Skip to content

Commit ad4a47f

Browse files
authored
Add CI workflow
1 parent 7496412 commit ad4a47f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/test.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Rust Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Rust toolchain
17+
uses: dtolnay/rust-toolchain@stable
18+
19+
- name: Run all checks
20+
run: |
21+
set -o pipefail
22+
EXIT_CODE=0
23+
echo "===== TESTS ====="
24+
cargo test || EXIT_CODE=$?
25+
echo "===== CHECK ====="
26+
cargo check || EXIT_CODE=$?
27+
echo "===== CLIPPY ====="
28+
cargo clippy -- -D warnings || EXIT_CODE=$?
29+
exit $EXIT_CODE

0 commit comments

Comments
 (0)