Skip to content

Commit 40c646e

Browse files
committed
setup CI
1 parent a56f514 commit 40c646e

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
RUSTFLAGS: "-Dwarnings" # Make sure CI fails on all warnings
16+
17+
jobs:
18+
CI:
19+
name: CI
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Use cache
26+
uses: Swatinem/rust-cache@v2
27+
28+
- name: Run clippy
29+
run: cargo clippy
30+
31+
- name: Run clippy with all features
32+
run: cargo clippy --all-features
33+
34+
- name: Check formatting
35+
run: cargo fmt --check
36+
37+
- name: Run tests
38+
run: cargo test
39+
40+
- name: Run tests with all features
41+
run: cargo test --all-features

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ license = "MIT OR Apache-2.0"
1212
unstable = ["partialdebug-derive/unstable"]
1313

1414
[dependencies]
15-
partialdebug-derive = "0.2.0"
15+
partialdebug-derive = { version = "0.2.0", path = "partialdebug-derive" }

rust-toolchain.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "nightly"
3+
components = ["clippy", "rustfmt"]

0 commit comments

Comments
 (0)