Skip to content

Commit 8d53ae2

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

File tree

5 files changed

+99
-0
lines changed

5 files changed

+99
-0
lines changed

.github/workflows/clippy-rustfmt.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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-tokio-socket
32+
run: cargo clippy
33+
34+
- name: clippy-smol-socket
35+
run: cargo clippy --no-default-features --features smol_socket

.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]

.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

.gitignore

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

.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

0 commit comments

Comments
 (0)