Skip to content

Commit 86e233a

Browse files
committed
Initial commit: torrust-server-lib v0.1.0
Common functionality used in all Torrust HTTP servers. Extracted from the torrust-tracker monorepo (packages/server-lib/) via file copy. See torrust/torrust-tracker issue #1909.
0 parents  commit 86e233a

1,400 files changed

Lines changed: 17699 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# CI Workflow for torrust-server-lib
2+
#
3+
# Runs linting and testing on every push and pull request to main/develop.
4+
5+
name: CI
6+
7+
on:
8+
push:
9+
branches: [main, develop]
10+
pull_request:
11+
branches: [main, develop]
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
16+
jobs:
17+
check:
18+
name: Lint and Test
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 30
21+
22+
steps:
23+
- id: checkout
24+
name: Checkout Repository
25+
uses: actions/checkout@v6
26+
27+
- id: setup
28+
name: Setup Toolchain
29+
uses: dtolnay/rust-toolchain@stable
30+
with:
31+
toolchain: nightly
32+
components: rustfmt, clippy
33+
34+
- id: sccache
35+
name: Install sccache (GHA backend)
36+
uses: mozilla-actions/sccache-action@v0.0.10
37+
38+
- id: enable-sccache
39+
name: Enable sccache
40+
run: |
41+
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
42+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
43+
echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"
44+
45+
- id: fetch
46+
name: Download Dependencies
47+
run: cargo fetch --verbose
48+
49+
- id: linter
50+
name: Install Internal Linter
51+
run: cargo install --locked --git https://github.com/torrust/torrust-linting --bin linter
52+
53+
- id: format
54+
name: Run Formatting Checks
55+
run: cargo fmt --check
56+
57+
- id: lint
58+
name: Run All Linters
59+
run: linter all
60+
61+
- id: test
62+
name: Run Tests
63+
run: cargo test --workspace

.markdownlint.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD031": true,
5+
"MD032": true,
6+
"MD040": true,
7+
"MD022": true,
8+
"MD009": true,
9+
"MD007": {
10+
"indent": 2
11+
},
12+
"MD026": false,
13+
"MD041": false,
14+
"MD034": false,
15+
"MD024": false,
16+
"MD033": false,
17+
"MD060": false
18+
}

.taplo.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Taplo configuration file for TOML formatting
2+
# Used by the "Even Better TOML" VS Code extension
3+
4+
# Exclude generated and runtime folders from linting
5+
exclude = [ ".coverage/**", "storage/**", "target/**" ]
6+
7+
[formatting]
8+
# Preserve blank lines that exist
9+
allowed_blank_lines = 1
10+
# Don't reorder keys to maintain structure
11+
reorder_keys = false
12+
# Array formatting
13+
array_auto_collapse = false
14+
array_auto_expand = false
15+
array_trailing_comma = true
16+
# Inline table formatting
17+
compact_arrays = false
18+
compact_inline_tables = false
19+
inline_table_expand = false
20+
# Alignment
21+
align_comments = true
22+
align_entries = false
23+
# Indentation
24+
indent_entries = false
25+
indent_tables = false
26+
# Other
27+
trailing_newline = true

0 commit comments

Comments
 (0)