Skip to content

Commit f6989bb

Browse files
committed
Add a github CI
1 parent e3b3e53 commit f6989bb

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Cargo Build & Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
build_and_test:
12+
name: Rust project - latest
13+
strategy:
14+
matrix:
15+
toolchain:
16+
- stable
17+
- beta
18+
- nightly
19+
os:
20+
- ubuntu-latest
21+
- macos-latest
22+
- windows-latest
23+
runs-on: ${{ matrix.os }}
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v3
27+
28+
- name: Setup rust toolchain ${{ matrix.toolchain }}
29+
run: |
30+
rustup update ${{ matrix.toolchain }}
31+
rustup default ${{ matrix.toolchain }}
32+
rustup component add rustfmt
33+
34+
- name: Check format
35+
run: cargo fmt --check
36+
37+
- name: Test code
38+
run: cargo test --verbose

0 commit comments

Comments
 (0)