Skip to content

Commit d697bb7

Browse files
committed
Enable CI
Signed-off-by: Gris Ge <[email protected]>
1 parent c50fb84 commit d697bb7

File tree

6 files changed

+97
-1
lines changed

6 files changed

+97
-1
lines changed

Diff for: .github/workflows/clippy-rustfmt.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Rustfmt and clippy check
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
rustfmt_clippy:
12+
strategy:
13+
fail-fast: true
14+
15+
name: Rustfmt and clippy check
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Install Rust Nightly
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: nightly
25+
override: true
26+
components: rustfmt, clippy
27+
28+
- name: rustfmt
29+
run: cargo fmt --all -- --check
30+
31+
- name: clippy
32+
run: cargo clippy

Diff for: .github/workflows/license.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: license
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
check-license:
12+
name: Check License
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 3
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Check License Header
19+
uses: apache/[email protected]

Diff for: .github/workflows/main.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
ci:
12+
name: CI (stable)
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install Rust Stable
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: stable
22+
override: true
23+
24+
- name: Test with default feature
25+
run: cargo test

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Cargo.lock
2+
target
3+
vendor/
4+
5+
*.swp

Diff for: .licenserc.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
header:
2+
license:
3+
content: |
4+
SPDX-License-Identifier: MIT
5+
paths-ignore:
6+
- 'target'
7+
- '**/*.toml'
8+
- '**/*.lock'
9+
- '**/*.yml'
10+
- '**/*.md'
11+
- 'CHANGELOG'
12+
- 'LICENSE-MIT'
13+
- '.gitignore'
14+
15+
comment: on-failure

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
homepage = "https://github.com/rust-netlink/netlink-packet-netfilter"
88
keywords = ["netlink", "linux", "netfilter"]
99
license = "MIT"
10-
readme = "../README.md"
10+
readme = "README.md"
1111
repository = "https://github.com/rust-netlink/netlink-packet-netfilter"
1212
description = "netlink packet types for the netfilter subprotocol"
1313

0 commit comments

Comments
 (0)