Skip to content

Commit de01392

Browse files
committed
Add ci workflow
1 parent 0fb9274 commit de01392

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
env:
4+
TYPOS_LINK: "https://github.com/crate-ci/typos/releases/download"
5+
TYPOS_VERSION: "1.23.4"
6+
7+
on:
8+
branches:
9+
- main
10+
pull_request: {}
11+
12+
jobs:
13+
crates:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Setup Rust
17+
uses: tracel-ai/github-actions/actions/setup-rust@v1
18+
with:
19+
rust-toolchain: stable
20+
cache-key: stable-linux
21+
# --------------------------------------------------------------------------------
22+
- name: Audit
23+
run: cargo xtask check audit
24+
# --------------------------------------------------------------------------------
25+
- name: Format
26+
shell: bash
27+
env:
28+
# work around for colors
29+
# see: https://github.com/rust-lang/rustfmt/issues/3385
30+
TERM: xterm-256color
31+
run: cargo xtask check format
32+
# --------------------------------------------------------------------------------
33+
- name: Lint
34+
run: cargo xtask check lint
35+
# --------------------------------------------------------------------------------
36+
- name: Typos
37+
uses: tracel-ai/github-actions/actions/check-typos@v1
38+
# --------------------------------------------------------------------------------
39+
- name: Build
40+
run: cargo xtask build
41+
# --------------------------------------------------------------------------------
42+
- name: Unit Tests
43+
run: cargo xtask test unit
44+
# --------------------------------------------------------------------------------
45+
- name: Integration Tests
46+
run: cargo xtask test integration
47+
# --------------------------------------------------------------------------------
48+
- name: Documentation Tests
49+
run: cargo xtask doc tests
50+

0 commit comments

Comments
 (0)