Skip to content

Commit c6bf7f2

Browse files
committed
chore: Fork treeline
1 parent d2a8f3e commit c6bf7f2

14 files changed

+406
-134
lines changed

.github/settings.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
2+
3+
repository:
4+
description: Visualize tree-like data on the command-line
5+
homepage: docs.rs/termtree
6+
topics: rust cli
7+
has_issues: true
8+
has_projects: false
9+
has_wiki: false
10+
has_downloads: true
11+
default_branch: main
12+
13+
allow_squash_merge: true
14+
allow_merge_commit: true
15+
allow_rebase_merge: true
16+
17+
# Manual: allow_auto_merge: true, see https://github.com/probot/settings/issues/402
18+
delete_branch_on_merge: true
19+
20+
labels:
21+
# Type
22+
- name: bug
23+
color: '#b60205'
24+
description: Not as expected
25+
- name: enhancement
26+
color: '#1d76db'
27+
description: Improve the expected
28+
# Flavor
29+
- name: question
30+
color: "#cc317c"
31+
description: Uncertainty is involved
32+
- name: breaking-change
33+
color: "#e99695"
34+
- name: good first issue
35+
color: '#c2e0c6'
36+
description: Help wanted!
37+
38+
branches:
39+
- name: main
40+
protection:
41+
required_pull_request_reviews: null
42+
required_conversation_resolution: true
43+
required_status_checks:
44+
# Required. Require branches to be up to date before merging.
45+
strict: false
46+
contexts: ["CI", "Lint Commits", "Spell Check with Typos"]
47+
enforce_admins: false
48+
restrictions: null

.github/workflows/audit.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Security audit
2+
on:
3+
pull_request:
4+
paths:
5+
- '**/Cargo.toml'
6+
- '**/Cargo.lock'
7+
push:
8+
paths:
9+
- '**/Cargo.toml'
10+
- '**/Cargo.lock'
11+
schedule:
12+
- cron: '16 16 16 * *'
13+
jobs:
14+
security_audit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
- uses: actions-rs/audit-check@v1
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
paths:
5+
- '**'
6+
- '!/*.md'
7+
- '!/docs/**'
8+
- "!/LICENSE-*"
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- '**'
14+
- '!/*.md'
15+
- '!/docs/**'
16+
- "!/LICENSE-*"
17+
schedule:
18+
- cron: '16 16 */2 * *'
19+
jobs:
20+
ci:
21+
name: CI
22+
needs: [smoke, test, msrv, docs, rustfmt, clippy]
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Done
26+
run: exit 0
27+
smoke:
28+
name: Quick Check
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v2
33+
- name: Install Rust
34+
uses: actions-rs/toolchain@v1
35+
with:
36+
toolchain: stable
37+
profile: minimal
38+
override: true
39+
- uses: Swatinem/rust-cache@v1
40+
- name: Default features
41+
run: cargo check --workspace --all-targets
42+
- name: All features
43+
run: cargo check --workspace --all-targets --all-features
44+
- name: No-default features
45+
run: cargo check --workspace --all-targets --no-default-features
46+
test:
47+
name: Test
48+
needs: smoke
49+
strategy:
50+
matrix:
51+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
52+
rust: ["stable"]
53+
continue-on-error: ${{ matrix.rust != 'stable' }}
54+
runs-on: ${{ matrix.os }}
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v2
58+
- name: Install Rust
59+
uses: actions-rs/toolchain@v1
60+
with:
61+
toolchain: ${{ matrix.rust }}
62+
profile: minimal
63+
override: true
64+
- uses: Swatinem/rust-cache@v1
65+
- name: Default features
66+
run: cargo test --workspace
67+
- name: All features
68+
run: cargo test --workspace --all-features
69+
- name: No-default features
70+
run: cargo test --workspace --no-default-features
71+
msrv:
72+
name: "Check MSRV: 1.46.0"
73+
needs: smoke
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Checkout repository
77+
uses: actions/checkout@v2
78+
- name: Install Rust
79+
uses: actions-rs/toolchain@v1
80+
with:
81+
toolchain: 1.46.0 # MSRV
82+
profile: minimal
83+
override: true
84+
- uses: Swatinem/rust-cache@v1
85+
- name: Default features
86+
run: cargo check --workspace --all-targets
87+
- name: All features
88+
run: cargo check --workspace --all-targets --all-features
89+
- name: No-default features
90+
run: cargo check --workspace --all-targets --no-default-features
91+
docs:
92+
name: Docs
93+
needs: smoke
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Checkout repository
97+
uses: actions/checkout@v2
98+
- name: Install Rust
99+
uses: actions-rs/toolchain@v1
100+
with:
101+
toolchain: stable
102+
profile: minimal
103+
override: true
104+
- uses: Swatinem/rust-cache@v1
105+
- name: Check documentation
106+
env:
107+
RUSTDOCFLAGS: -D warnings
108+
run: cargo doc --no-deps --document-private-items --workspace
109+
rustfmt:
110+
name: rustfmt
111+
runs-on: ubuntu-latest
112+
steps:
113+
- name: Checkout repository
114+
uses: actions/checkout@v2
115+
- name: Install Rust
116+
uses: actions-rs/toolchain@v1
117+
with:
118+
# Not MSRV because its harder to jump between versions and people are
119+
# more likely to have stable
120+
toolchain: stable
121+
profile: minimal
122+
override: true
123+
components: rustfmt
124+
- uses: Swatinem/rust-cache@v1
125+
- name: Check formatting
126+
run: cargo fmt --all -- --check
127+
clippy:
128+
name: clippy
129+
runs-on: ubuntu-latest
130+
steps:
131+
- name: Checkout repository
132+
uses: actions/checkout@v2
133+
- name: Install Rust
134+
uses: actions-rs/toolchain@v1
135+
with:
136+
toolchain: 1.46.0 # MSRV
137+
profile: minimal
138+
override: true
139+
components: clippy
140+
- uses: Swatinem/rust-cache@v1
141+
- uses: actions-rs/clippy-check@v1
142+
with:
143+
token: ${{ secrets.GITHUB_TOKEN }}
144+
args: --workspace --all-features --all-targets -- -D warnings

.github/workflows/committed.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint Commits
2+
on: [pull_request]
3+
4+
jobs:
5+
committed:
6+
name: Lint Commits
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Actions Repository
10+
uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- name: Lint Commits
14+
uses: crate-ci/committed@master

.github/workflows/main.yml

-101
This file was deleted.

.github/workflows/pre-commit.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
push:
5+
branches: [source]
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v2
12+
- uses: pre-commit/[email protected]

0 commit comments

Comments
 (0)